feat(web): add nginx configuration
This commit is contained in:
parent
022b3f501e
commit
6341bf77f8
1 changed files with 27 additions and 0 deletions
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…
Add table
Add a link
Reference in a new issue