Nginx: Difference between revisions

Dander (talk | contribs)
m add a proper installation section (see MoS)
Extra Config section added
 
Line 441: Line 441:
services.nginx.package = pkgs.nginxStable.override { openssl = pkgs.libressl; };
services.nginx.package = pkgs.nginxStable.override { openssl = pkgs.libressl; };
</syntaxHighlight>
</syntaxHighlight>
== Extra config ==
Appart native options, Nix allows to specify verbatim Nginx configuration. Some options are mutually exclusive.
Below table assumes "services.nginx." prefix for all options. These options allows to keep using Nix configuration file while taking advantage of Nginx features which are not representend in options.
{| class="wikitable"
|+
!Options
!Block
!Behaviour
|-
|config
|nginx.conf
|Verbatim <code>nginx.conf</code> configuration
|-
|appendConfig
|nginx.conf
|Lines appended to the generated Nginx configuration file
|-
|httpConfig
|http block
|exclusive with the structured configuration via virtualHosts
|-
|appendHttpConfig
|http block
|lines appended. exclusive with using config and httpConfig
|-
|virtualHosts.<name>.extraConfig
|server
|These lines go to the end of the vhost verbatim.
|-
|virtualHosts.<name>.locations.<name>.extraConfig
|server
|These lines go to the end of the location  verbatim
|}


== See more ==
== See more ==