(gnu services web) module provides the following service:
Return a service that runs nginx, the nginx web server.
The nginx daemon loads its runtime configuration from config-file. Log files are written to log-directory and temporary runtime data files are written to run-directory. For proper operation, these arguments should match what is in config-file to ensure that the directories are created when the service is activated.
As an alternative to using a config-file, vhost-list can be used to specify the list of virtual hosts required on the host. For this to work, use the default value for config-file.
Data type representing the configuration of an nginx virtual host. This type has the following parameters:
Nginx will listen for HTTP connection on this port. Set it at
nginx should not listen for HTTP (non secure) connection for this
Nginx will listen for HTTPS connection on this port. Set it at
nginx should not listen for HTTPS (secure) connection for this virtual host.
Note that nginx can listen for HTTP and HTTPS connections in the same virtual host.
A list of server names this vhost represents.
'default represents the
default vhost for connections matching no other vhost.
Root of the website nginx will serve.
Index files to look for when clients ask for a directory. If it cannot be found, Nginx will send the list of files in the directory.
Where to find the certificate for secure connections. Set it to
you don’t have a certificate or you don’t want to use HTTPS.
Where to find the private key for secure connections. Set it to
you don’t have a key or you don’t want to use HTTPS.
Whether the server should add its configuration to response.