feat(web): add nginx configuration
This commit is contained in:
parent
999db46720
commit
164a57da25
27
spec/web/nginx.nix
Normal file
27
spec/web/nginx.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ pkgs
|
||||
, ...}: {
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
|
||||
# enable all recommended settings
|
||||
recommendedTlsSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedProxySettings = true;
|
||||
|
||||
virtualHosts = {
|
||||
"_" = {
|
||||
rejectSSL = true;
|
||||
extraConfig = "return 444;";
|
||||
};
|
||||
|
||||
"514fpv.one" = {
|
||||
root = pkgs.callPackage ./site { };
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
}
|
Loading…
Reference in a new issue