Nginx Basics: Difference between revisions

From WikiMLT
Line 1: Line 1:
<noinclude><!--[[Category:Web_Servers|?]]-->{{ContentArticleHeader/Web_Servers}}</noinclude>
<noinclude><!--[[Category:Web_Servers|?]]-->{{ContentArticleHeader/Web_Servers}}</noinclude>
== CLI ==
<syntaxhighlight lang="shell" line="1">
sudo nginx -h
</syntaxhighlight><syntaxhighlight lang="shell-session">
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
</syntaxhighlight>Control via <code>systemctl</code>.<syntaxhighlight lang="shell" line="1">
sudo systemctl start nginx.service
</syntaxhighlight><syntaxhighlight lang="shell" line="1">
sudo systemctl stop nginx.service
</syntaxhighlight><syntaxhighlight lang="shell" line="1">
sudo systemctl reload nginx.service
</syntaxhighlight><syntaxhighlight lang="shell" line="1">
sudo systemctl restart nginx.service
</syntaxhighlight>


== References ==
== References ==
Line 12: Line 44:
* Proxmox VE Wiki: [[pve:Web_Interface_Via_Nginx_Proxy|Web Interface Via Nginx Proxy]]
* Proxmox VE Wiki: [[pve:Web_Interface_Via_Nginx_Proxy|Web Interface Via Nginx Proxy]]
* Server Fault: [https://serverfault.com/questions/30705/how-to-set-up-nginx-as-a-caching-reverse-proxy How to set up Nginx as a caching reverse proxy?]   
* Server Fault: [https://serverfault.com/questions/30705/how-to-set-up-nginx-as-a-caching-reverse-proxy How to set up Nginx as a caching reverse proxy?]   
<noinclude>
<noinclude>
<div id='devStage'>
<div id='devStage'>

Revision as of 10:31, 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

Con­trol via sys­tem­ctl.

sudo systemctl start nginx.service
sudo systemctl stop nginx.service
sudo systemctl reload nginx.service
sudo systemctl restart nginx.service

Ref­er­ences