Options:
-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/local/Cellar/nginx/1.17.3_1/)
-c filename :
set
configuration file (default: /usr/local/etc/nginx/nginx.conf)
-g directives :
set
global directives out of configuration file
config
配置文件路径
安装目录/配置文件目录:
/usr/local/etc/nginx
默认的
prefix
目录:
/usr/local/Cellar/nginx
worker_processes 1;
events {
worker_connections 1024;
http {
upstream tomcatserver1 {
ip_hash;
server 10.10.71.50:10086 weight=2;
server 127.0.0.1:8888;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 8080;
server_name localhost;
location / {
root html;
index index.html index.htm;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
server {
listen 8989;
server_name localhost;
error_log logs/error.log notice;
rewrite_log on;
location /file/ {
rewrite_log on;
add_header Cache-Control no-cache;
proxy_set_header Host local.baidu.com;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for
;
proxy_set_header X-Real-IP
$remote_addr
;
rewrite (.+)(?=\.([^\.]+)(?!\.)\b)
$1
break
;
proxy_pass http://61.164.53.62:8728;
proxy_connect_timeout 30s;
include servers/*;
actualchao
前端摸鱼工程师 @前端
粉丝