Nginx: Difference between revisions
imported>Makefu initial batch of nixos-users |
imported>Fadenb m Syntax highlighting |
||
Line 3: | Line 3: | ||
Static blog with ssl enforced in <code>configuration.nix</code> | Static blog with ssl enforced in <code>configuration.nix</code> | ||
< | <syntaxhighlight lang="nix"> | ||
services.nginx = { | |||
enable = true; | enable = true; | ||
virtualHosts. | virtualHosts."blog.example.com" = { | ||
enableSSL = true; | enableSSL = true; | ||
enableACME = true; | enableACME = true; | ||
forceSSL = true; | forceSSL = true; | ||
root = | root = "/var/www/blog"; | ||
}; | }; | ||
} | } | ||
</syntaxhighlight> |
Revision as of 13:31, 27 August 2017
Sample setups
Static blog with ssl enforced in configuration.nix
services.nginx = {
enable = true;
virtualHosts."blog.example.com" = {
enableSSL = true;
enableACME = true;
forceSSL = true;
root = "/var/www/blog";
};
}