Nginx: Difference between revisions

Makefu (talk | contribs)
Restructure to start with an example, put the openssl stuff and troubleshooting at the back
m Add a raw html test example
Line 2: Line 2:


== Sample setups ==
== Sample setups ==
==== Minimal raw html dummy page for testing <code>configuration.nix</code> ====
<syntaxhighlight lang="nix">
services.nginx = {
  enable = true;
  locations."/" = {
    return = "200 '<html><body>It works</body></html>'";
    extraConfig = ''
      default_type text/html;
    '';
  };
};
</syntaxhighlight>


==== Static blog with ssl enforced in <code>configuration.nix</code> ====
==== Static blog with ssl enforced in <code>configuration.nix</code> ====