nginx命令

nginx -t #测试nginx配置文件
nginx -s reload #重载nginx服务
nginx -s stop #停止nginx服务
nginx -v #查看版本信息
nginx -V #查看版本信息和编译信息
sudo nginx            # start
sudo nginx -s stop    # stop
sudo nginx -s reload  # restart

REST

try_files $uri $uri/ /index.php$is_args$args;
# Settings for a TLS enabled server.

    server {
        listen       443 ssl http2 default_server;
        server_name  berton.site;
        root         /usr/share/nginx/html;

        ssl_certificate "/etc/nginx/ssl/fullchain.cer";
        ssl_certificate_key "/etc/nginx/ssl/berton.site.key";
		ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_session_cache shared:SSL:1m;
        ssl_session_timeout  10m;
        ssl_ciphers HIGH:!aNULL:!MD5;
        ssl_prefer_server_ciphers on;

        # Load configuration files for the default server block.
        #include /etc/nginx/default.d/*.conf;

        location /admin {
  	     	proxy_redirect off;
  	     	proxy_pass http://127.0.0.1:1081;
	     	proxy_http_version 1.1;
	     	proxy_set_header Upgrade $http_upgrade;
	     	proxy_set_header Connection "upgrade";
  	     	proxy_set_header Host $http_host;

        	# Show realip in v2ray access.log
        	proxy_set_header X-Real-IP $remote_addr;
        	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
    }

中转

events {
        worker_connections 768;
        # multi_accept on;
}

stream{
    upstream group {
        server berton.site:443;     # ip:port
    }

    server {
        listen 0.0.0.0:80;
        listen 80 udp;
        proxy_pass group;
        proxy_timeout 10m;
        proxy_connect_timeout 5000ms;
    }
}