168 lines
		
	
	
		
			6.7 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
		
		
			
		
	
	
			168 lines
		
	
	
		
			6.7 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
|   | worker_processes  1; | ||
|  | 
 | ||
|  | events { | ||
|  |     worker_connections  1024; | ||
|  | } | ||
|  | 
 | ||
|  | http { | ||
|  |     include       mime.types; | ||
|  |     default_type  application/octet-stream; | ||
|  |     sendfile        on; | ||
|  |     keepalive_timeout  65; | ||
|  |     gzip  on; | ||
|  |     gzip_types text/plain application/javascript   application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png; | ||
|  |     gzip_disable "MSIE [1-6]\."; | ||
|  |     gzip_min_length 1k; | ||
|  |     gzip_buffers 4 16k; | ||
|  |     gzip_comp_level 2; | ||
|  |     client_max_body_size 300M; | ||
|  |     include /data/tengine/conf/vhosts/*.conf; | ||
|  |      | ||
|  |     upstream backend { | ||
|  |         server 127.0.0.1:8080; | ||
|  |         #server 172.24.16.7:8080; | ||
|  |         #check interval=5000 rise=2 fall=5 timeout=1000; | ||
|  |     } | ||
|  | 
 | ||
|  |     server { | ||
|  |         listen 443; | ||
|  |         server_name  testadmin.scalelink.cn; | ||
|  |         ssl_certificate  /usr/local/nginx/conf/certificate/testadmin.scalelink.cn_bundle.crt; | ||
|  |         ssl_certificate_key /usr/local/nginx/conf/certificate/testadmin.scalelink.cn.key; | ||
|  |         ssl_session_timeout 5m; | ||
|  |         ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; | ||
|  |         ssl_protocols TLSv1.2 TLSv1.3; | ||
|  |         ssl_prefer_server_ciphers on; | ||
|  |         location / { | ||
|  |             root  /data/tengine/html/fly_moon_web/dist; | ||
|  |             index  index.html index.htm; | ||
|  |             try_files $uri $uri/ /index.html; | ||
|  |         } | ||
|  | 
 | ||
|  |         error_page   500 502 503 504  /50x.html; | ||
|  |         location = /50x.html { | ||
|  |             root   html; | ||
|  |         } | ||
|  | 
 | ||
|  |         location ^~ /test-api { | ||
|  |                 client_max_body_size 100m; | ||
|  |                 proxy_pass   http://backend; | ||
|  |                 proxy_set_header Host $host; | ||
|  |                 proxy_set_header X-Real-IP $remote_addr; | ||
|  |                 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
|  |                 proxy_set_header X-Forwarded-Proto $scheme; | ||
|  |         } | ||
|  | 
 | ||
|  |         location /test-api/system/common/file/uploadAttachment { | ||
|  |             client_max_body_size 288M;           # 设置上传文件最大为 288MB | ||
|  |             client_body_buffer_size 1M;         # 设置最大缓冲区为 1MB | ||
|  |             proxy_pass http://backend;          # 后端服务地址 | ||
|  |             proxy_set_header Host $host;        # 转发请求的 Host | ||
|  |             proxy_set_header X-Real-IP $remote_addr;  # 转发真实客户端 IP | ||
|  |             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 代理链 | ||
|  |             # 可选超时配置 | ||
|  |             proxy_connect_timeout 10s;          # 连接后端超时时间 | ||
|  |             proxy_send_timeout 300s;            # 发送数据到后端的超时时间 | ||
|  |             proxy_read_timeout 300s;            # 读取后端响应的超时时间 | ||
|  |         } | ||
|  | 
 | ||
|  |         location /test-api/monitor/job { | ||
|  |             proxy_pass         http://127.0.0.1:8050$uri; | ||
|  |             proxy_set_header   Host $host; | ||
|  |             proxy_set_header   X-Real-IP $remote_addr; | ||
|  |             proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for; | ||
|  |             proxy_set_header   X-Forwarded-Proto $scheme; | ||
|  |             proxy_redirect     off; | ||
|  |         } | ||
|  |         location /test-api/monitor/jobLog { | ||
|  |             proxy_pass         http://127.0.0.1:8050$uri; | ||
|  |             proxy_set_header   Host $host; | ||
|  |             proxy_set_header   X-Real-IP $remote_addr; | ||
|  |             proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for; | ||
|  |             proxy_set_header   X-Forwarded-Proto $scheme; | ||
|  |             proxy_redirect     off; | ||
|  |         } | ||
|  |     } | ||
|  | 
 | ||
|  |     server { | ||
|  |         listen 80; | ||
|  |         # 请填写绑定证书的域名 | ||
|  |         server_name testadmin.scalelink.cn; | ||
|  |         #把http的域名请求转成https | ||
|  |         return 301 https://$host$request_uri; | ||
|  |     } | ||
|  | 
 | ||
|  |      | ||
|  |     # server { | ||
|  |     #     listen 443; | ||
|  |     #     server_name  testadmin.deeplink.media; | ||
|  |     #     return 301 https://testadmin.scalelink.cn$request_uri; | ||
|  |     #     ssl_certificate  /usr/local/nginx/conf/certificate/testadmin.scalelink.cn_bundle.crt; | ||
|  |     #     ssl_certificate_key /usr/local/nginx/conf/certificate/testadmin.scalelink.cn.key; | ||
|  |     #     ssl_session_timeout 5m; | ||
|  |     #     ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; | ||
|  |     #     ssl_protocols TLSv1.2 TLSv1.3; | ||
|  |     #     ssl_prefer_server_ciphers on; | ||
|  |     #     location / { | ||
|  |     #         root  /data/tengine/html/fly_moon_web/dist; | ||
|  |     #         index  index.html index.htm; | ||
|  |     #         try_files $uri $uri/ /index.html; | ||
|  |     #     } | ||
|  | 
 | ||
|  |     #     error_page   500 502 503 504  /50x.html; | ||
|  |     #     location = /50x.html { | ||
|  |     #         root   html; | ||
|  |     #     } | ||
|  | 
 | ||
|  |     #     location ^~ /test-api { | ||
|  |     #             client_max_body_size 100m; | ||
|  |     #             proxy_pass   http://backend; | ||
|  |     #             proxy_set_header Host $host; | ||
|  |     #             proxy_set_header X-Real-IP $remote_addr; | ||
|  |     #             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
|  |     #             proxy_set_header X-Forwarded-Proto $scheme; | ||
|  |     #     } | ||
|  | 
 | ||
|  |     #     location /test-api/system/common/file/uploadAttachment { | ||
|  |     #         client_max_body_size 288M;           # 设置上传文件最大为 288MB | ||
|  |     #         client_body_buffer_size 1M;         # 设置最大缓冲区为 1MB | ||
|  |     #         proxy_pass http://backend;          # 后端服务地址 | ||
|  |     #         proxy_set_header Host $host;        # 转发请求的 Host | ||
|  |     #         proxy_set_header X-Real-IP $remote_addr;  # 转发真实客户端 IP | ||
|  |     #         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 代理链 | ||
|  |     #         # 可选超时配置 | ||
|  |     #         proxy_connect_timeout 10s;          # 连接后端超时时间 | ||
|  |     #         proxy_send_timeout 300s;            # 发送数据到后端的超时时间 | ||
|  |     #         proxy_read_timeout 300s;            # 读取后端响应的超时时间 | ||
|  |     #     } | ||
|  | 
 | ||
|  |     #     location /test-api/monitor/job { | ||
|  |     #         proxy_pass         http://127.0.0.1:8050$uri; | ||
|  |     #         proxy_set_header   Host $host; | ||
|  |     #         proxy_set_header   X-Real-IP $remote_addr; | ||
|  |     #         proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for; | ||
|  |     #         proxy_set_header   X-Forwarded-Proto $scheme; | ||
|  |     #         proxy_redirect     off; | ||
|  |     #     } | ||
|  |     #     location /test-api/monitor/jobLog { | ||
|  |     #         proxy_pass         http://127.0.0.1:8050$uri; | ||
|  |     #         proxy_set_header   Host $host; | ||
|  |     #         proxy_set_header   X-Real-IP $remote_addr; | ||
|  |     #         proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for; | ||
|  |     #         proxy_set_header   X-Forwarded-Proto $scheme; | ||
|  |     #         proxy_redirect     off; | ||
|  |     #     } | ||
|  |     # } | ||
|  | 
 | ||
|  |     # server { | ||
|  |     #     listen 80; | ||
|  |     #     # 请填写绑定证书的域名 | ||
|  |     #     server_name testadmin.deeplink.media; | ||
|  |     #     #把http的域名请求转成https | ||
|  |     #     #return 301 https://$host$request_uri; | ||
|  |     #     return 301 https://testadmin.scalelink.cn$request_uri; | ||
|  |     # } | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | } |