Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.


What this page means

nginx is running on this host and answered your request. No site has been configured to take over for this hostname yet, so the default index.html from the bundled distribution is being served. The page exists purely as a reachability test — if you reach it, the daemon is alive and listening on the public interface.

Where to put your files

The default document root is /usr/share/nginx/html on most distributions. Replace the bundled index.html with your own and the next request will return your content. You do not need to restart nginx for content updates — only configuration changes require a reload.

If you intend to host more than one site on this server, give each site its own directory tree and its own server block.

Configuring a real site

  1. Create /etc/nginx/conf.d/yoursite.conf.
  2. Add a server { ... } block with listen 80;, server_name yourdomain.tld;, and a root directive pointing at your files.
  3. Run nginx -t to check the syntax.
  4. Reload with sudo systemctl reload nginx.
  5. Visit your domain in a browser to confirm the new site responds.

HTTPS

Issue a certificate with your favourite ACME client and add the listen 443 ssl; directives along with ssl_certificate and ssl_certificate_key paths to your server block. Once the renewal cron job is in place, certificates rotate without operator intervention.

Logs

Access entries are in /var/log/nginx/access.log. Errors land in error.log in the same directory. Watch them with tail -f while you experiment so you can see the server's view of every request as it lands. The default log format records the client IP, status code, byte count and User-Agent.

srv-fra1-edge-2 · nginx