其他我照这写的都没问题啊~~就这个不行~~ 感谢感谢
server
{
listen 80;
server_name therouter.320.io;
if ($http_user_agent ~* (baiduspider|360spider|haosouspider|googlebot|soso|bing|sogou|yahoo|sohu-search|yodao|YoudaoBot|robozilla|msnbot|MJ12bot|NHN|Twiceler)) {
return 403;
}
location / {
sub_filter jsjcjsjc.asuscomm.com:50000 therouter.320.io;
sub_filter_once off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Referer http://jsjcjsjc.asuscomm.com:50000;
proxy_set_header Host jsjcjsjc.asuscomm.com:50000;
proxy_pass http://jsjcjsjc.asuscomm.com:50000;
proxy_set_header Accept-Encoding "";
}
}
1
qwefdrt 2019-01-07 23:50:41 +08:00 via iPhone 1
proxy_pass http://jsjcjsjc.asuscomm.com:50000;
域名加端口? |
2
Honwhy 2019-01-08 10:06:58 +08:00 1
查看一下 access_log,是不是替换后的 URL 不合法呢
|
3
jsjcjsjc OP @Honwhy 这个错误,看不明白啊
2019/01/08 07:25:40 [error] 19114#0: *4 upstream timed out (110: Connection timed out) while connecting to upstream, client: 180.117.33.151, server: therouter.320.io, request: "GET / HTTP/1.1", upstream: "http://180.117.33.151:50000/", host: "therouter.320.io" 2019/01/08 07:26:33 [error] 19114#0: *2 upstream timed out (110: Connection timed out) while connecting to upstream, client: 180.117.33.151, server: therouter.320.io, request: "GET /favicon.ico HTTP/1.1", upstream: "http://180.117.33.151:50000/favicon.ico", host: "therouter.320.io", referrer: "http://therouter.320.io/" |