26 lines
829 B
Plaintext
26 lines
829 B
Plaintext
|
|
server {
|
||
|
|
listen 8010; # 监听 8010 端口
|
||
|
|
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;
|
||
|
|
allow 43.153.21.64;
|
||
|
|
allow 170.106.187.49;
|
||
|
|
allow 192.168.70.13;
|
||
|
|
allow 192.168.70.7;
|
||
|
|
deny all; # 拒绝其他所有 IP
|
||
|
|
|
||
|
|
access_log /data/tengine/logs/sit_8090_access.log;
|
||
|
|
error_log /data/tengine/logs/sit_8090_error.log;
|
||
|
|
|
||
|
|
location / {
|
||
|
|
proxy_pass http://192.168.70.18:8090; # 反向代理到本地电脑的sit的8090
|
||
|
|
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;
|
||
|
|
}
|
||
|
|
}
|