Nginx Basics: Difference between revisions
From WikiMLT
m →CLI |
|||
Line 19: | Line 19: | ||
-c filename : set configuration file (default: /etc/nginx/nginx.conf) | -c filename : set configuration file (default: /etc/nginx/nginx.conf) | ||
-g directives : set global directives out of configuration file | -g directives : set global directives out of configuration file | ||
</syntaxhighlight>Control via <code>systemctl</code>.<syntaxhighlight lang="shell" line="1"> | </syntaxhighlight> | ||
Control via <code>systemctl</code>. | |||
<syntaxhighlight lang="shell" line="1" class="code-continue"> | |||
sudo systemctl start nginx.service | sudo systemctl start nginx.service | ||
</syntaxhighlight> | |||
</syntaxhighlight><syntaxhighlight lang="shell" line="1"> | <syntaxhighlight lang="shell" line="1" class="code-continue mlw-shell-gray"> | ||
sudo systemctl stop nginx.service | sudo systemctl stop nginx.service | ||
</syntaxhighlight> | |||
</syntaxhighlight><syntaxhighlight lang="shell" line="1"> | <syntaxhighlight lang="shell" line="1" class="code-continue"> | ||
sudo systemctl reload nginx.service | sudo systemctl reload nginx.service | ||
</syntaxhighlight> | |||
</syntaxhighlight><syntaxhighlight lang="shell" line="1"> | <syntaxhighlight lang="shell" line="1" class="code-continue mlw-shell-gray"> | ||
sudo systemctl restart nginx.service | sudo systemctl restart nginx.service | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 09:38, 18 February 2023
CLI
sudo nginx -h
nginx version: nginx/1.18.0 (Ubuntu)
Usage: nginx [-?hvVtTq] [-s signal] [-c filename] [-p prefix] [-g directives]
Options:
-?,-h : this help
-v : show version and exit
-V : show version and configure options then exit
-t : test configuration and exit
-T : test configuration, dump it and exit
-q : suppress non-error messages during configuration testing
-s signal : send signal to a master process: stop, quit, reopen, reload
-p prefix : set prefix path (default: /usr/share/nginx/)
-c filename : set configuration file (default: /etc/nginx/nginx.conf)
-g directives : set global directives out of configuration file
Control via systemctl
.
sudo systemctl start nginx.service
sudo systemctl stop nginx.service
sudo systemctl reload nginx.service
sudo systemctl restart nginx.service
References
- NGINX Docs: Product Documentation
- NGINX Docs: NGINX ModSecurity WAF Documentation
- Linode Docs: Securing Nginx With ModSecurity
- NGINX Part of F5: F5 NGINX ModSecurity WAF Is Transitioning to End-of-Life
- TrustWave Software Updates: End of Sale and Trustwave Support for ModSecurity Web Application Firewall
- OWASP Docs: OWASP Core Ruleset Project announces Coraza SecLang engine
- Proxmox VE Wiki: Web Interface Via Nginx Proxy
- Server Fault: How to set up Nginx as a caching reverse proxy?