Nginx Nginx command and command

Nginx command

h View help options

V view the version and configuration options
t test nginx syntax errors
c filename specified configuration files file (default:
/etc/nginx/nginx.conf)
S Signal send a signal to the master process, signal can be
as: stop, quit, reopen, reload example cases : -s stop
Stop stop nginx -s reload load configuration files file
g directives specified in the command ⾏ global instruction in trekking

 

Nginx configuration file

The main configuration files file structure: four

main block: the master configuration section, i.e. the overall configuration section, of HT
TP, mail valid
Event {
...
} event-driven configuration related
HTTP {
...
} HTTP / HTTPS protocol configuration section
mail {
...
} mail protocol configuration section
Stream {
...
} Stream server configuration section RELATED

 

http protocol-related configuration structure

{HTTP
...
... each server common configuration
server {Using each server is used to define a virtual ⼀
host
...
}
server {
...
server_name virtual host name
root directory primary destination time
alias passage path alias
location [OPERATOR ] {URL refers to
the characteristics given URL
...
IF CONDITION {
...
}
}
}
}

 

Guess you like

Origin www.cnblogs.com/momenglin/p/10956872.html