nginx 配置文件模版
本文最后更新于 329 天前,其中的信息可能已经有所发展或是发生改变。
user root;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
	worker_connections 768;
}
http {
	sendfile on;
	tcp_nopush on;
	tcp_nodelay on;
	keepalive_timeout 65;
	types_hash_max_size 2048;
	client_max_body_size 1000m;
	include /etc/nginx/mime.types;
	default_type application/octet-stream;
	ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
	ssl_prefer_server_ciphers on;
	access_log /var/log/nginx/access.log;
	error_log /var/log/nginx/error.log;
	gzip on;
	include /etc/nginx/conf.d/*.conf;
	include /etc/nginx/sites-enabled/*;
	server {
		listen 80;
                listen [::]:80;
		server_name <host>;
                location / {
                        proxy_pass http://127.0.0.1:8008;
                        proxy_set_header Upgrade $http_upgrade;
                        proxy_set_header Connection "upgrade";
                        proxy_set_header Host $host;
                        proxy_set_header X-Real-IP $remote_addr;
                        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		}
        }
	server {
		listen 80;
                listen [::]:80;
		server_name <host>;
                location / {
                        proxy_pass http://127.0.0.1:7791;
                        proxy_set_header Upgrade $http_upgrade;
                        proxy_set_header Connection "upgrade";
                        proxy_set_header Host $host;
                        proxy_set_header X-Real-IP $remote_addr;
                        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		}
        }
	server {
		listen 80;
                listen [::]:80;
		server_name <host>;
                location / {
                        proxy_pass http://127.0.0.1:37001;
                        proxy_set_header Upgrade $http_upgrade;
                        proxy_set_header Connection "upgrade";
                        proxy_set_header Host $host;
                        proxy_set_header X-Real-IP $remote_addr;
                        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		}
        }


	server {
		listen 80;
		listen [::]:80;
		server_name <host>;
 
		location / {
			root /usr/docsify;
			index index.html;
		}
		location /duo {
			proxy_pass http://127.0.0.1:26999;
			proxy_set_header Upgrade $http_upgrade;
			proxy_set_header Connection "upgrade";
			proxy_set_header Host $host;
			proxy_set_header X-Real-IP $remote_addr;
			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		}
		location /xui {
			proxy_pass http://127.0.0.1:9000;
			proxy_set_header Upgrade $http_upgrade;
			proxy_set_header Connection "upgrade";
			proxy_set_header Host $host;
			proxy_set_header X-Real-IP $remote_addr;
			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		}
		location /file {
			proxy_pass http://127.0.0.1:9001;
			proxy_set_header Upgrade $http_upgrade;
			proxy_set_header Connection "upgrade";
			proxy_set_header Host $host;
			proxy_set_header X-Real-IP $remote_addr;
			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		}
		location /jbz{
			alias /usr/jbz/App;  
			index index.html;
    		}
    		location /jbz/Scene {
        		alias /usr/jbz/Scene;
		}
	}
}
暂无评论

发送评论 编辑评论


				
上一篇
下一篇