Access to Wikipedia can be disturbed randomly in my country
Running Debian 7 with nginx 1.2.1 with additional ngx_http_substitutions_filter_module
use several sub-domains to reverse proxy corresponding sub-domain of wikipedia
w.mydomain.tld
for zh.wikipedia.org
m.w.mydomain.tld
for zh.m.wikipedia.org
. For mobile site
up.w.mydomain.tld
for upload.wikimedia.org
My nginx config looks like this
.......
location / {
proxy_pass https://zh.wikipedia.org;
proxy_cookie_domain zh.wikipedia.org w.mydomain.tld;
proxy_redirect https://zh.wikipedia.org/ /;
proxy_redirect https://zh.m.wikipedia.org/ https://m.w.mymain.tld/;
proxy_set_header Host "zh.wikipedia.org";
proxy_set_header Referer "https://zh.wikipedia.org$request_uri";
subs_filter_types text/css text/xml text/javascript;
subs_filter zh.wikipedia.org w.mydomain.tld;
subs_filter upload.wikimedia.org up.w.mydomain.tld;
subs_filter zh.m.wikipedia.org m.w.mydomain.tld;
sub_filter_once off;
}
location https://zh.m.wikipedia.org/{
rewrite ^/(.*) https://m.w.mydomain.tld/$1 permanent;
}
}
Server config for m.w.domain.tld and up.w.domain.tld are similar
No matter how I always get a 500 internal server error and there are no infos on error.log
Many thanks in advance:)
Update: I have tried remove the last location section and a similar configuration works for Google, still no clue:(