mirror of https://github.com/openspug/spug
				
				
				
			
		
			
				
	
	
		
			26 lines
		
	
	
		
			729 B
		
	
	
	
		
			Plaintext
		
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			729 B
		
	
	
	
		
			Plaintext
		
	
	
| server {
 | |
|         listen 80;
 | |
|         server_name _;  # 修改为自定义的访问域名
 | |
|         root /var/www/build/;
 | |
| 
 | |
|         location ^~ /api/ {
 | |
|                 rewrite ^/api(.*) $1 break;
 | |
| 
 | |
|                 proxy_pass http://127.0.0.1:9001;
 | |
|                 proxy_redirect off;
 | |
|                 proxy_set_header X-Real-IP $remote_addr;
 | |
|         }
 | |
| 
 | |
|         location ^~ /api/ws/ {
 | |
|                 rewrite ^/api(.*) $1 break;
 | |
| 
 | |
|                 proxy_pass http://127.0.0.1:9002;
 | |
|                 proxy_http_version 1.1;
 | |
|                 proxy_set_header Upgrade $http_upgrade;
 | |
|                 proxy_set_header Connection "Upgrade";
 | |
|                 proxy_set_header X-Real-IP $remote_addr;
 | |
|         }
 | |
| 
 | |
| 
 | |
|         error_page 404 /index.html;
 | |
| } |