Tips&Tricks

Popular nginx parameters

nginx logo green

Web server NGINX is a free, open-source, high-performance HTTP server. Also you can use it as a reverse proxy, and IMAP/POP3 proxy server. It has many plugins to extend its functionality.

Probably NGINX is the most popular web server of all. Because even if you use Apache, you should use NGINX to serve static files.

Commands & parameters

Start server with default config:

nginx

Run server with custom config file:

nginx -c {{ config file }}

Start server with a prefix for all relative paths in config file:

nginx -c {{ config file }} -p {{ prefix/for/relative/paths }}

Test configuration without affecting the running server:

nginx -t

Reload configuration by sending a signal with no downtime:

nginx -s reload

Also you can work with nginx-server via systemctl command. It works on modern Linux.