24 lines
		
	
	
		
			772 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
		
		
			
		
	
	
			24 lines
		
	
	
		
			772 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
|  | server { | ||
|  |     listen 8070;  # 监听 8070 端口 | ||
|  |     server_name 106.53.194.199;  # 运维机 的公网 IP | ||
|  | 
 | ||
|  |     allow 43.159.145.241;  # 只允许海外服务器的 IP 访问 | ||
|  |     allow 49.51.46.148; | ||
|  |     allow 43.130.56.138; | ||
|  |     allow 43.130.59.68; | ||
|  |     deny all;              # 拒绝其他所有 IP | ||
|  | 
 | ||
|  |     access_log /data/tengine/logs/sit_8070_access.log; | ||
|  |     error_log /data/tengine/logs/sit_8070_error.log; | ||
|  | 
 | ||
|  |     location / { | ||
|  |         proxy_pass http://192.168.70.18:8070;  # 反向代理到本地电脑的sit的8070 | ||
|  |         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; | ||
|  |        | ||
|  |         client_max_body_size 300M; | ||
|  |     } | ||
|  | } |