访问维基百科可能会在我的国家随机扰乱使用nginx 1.2.1运行Debian 7以及其他ngx_http_substitutions_filter_module
使用几个子域来为zh.m.wikipedia.org w.mydomain.tld对于zh.wikipedia.org的维基百科w.mydomain.tld代理对应的子域。 对于移动网站up.w.mydomain.tld upload.wikimedia.org
我的nginxconfiguration看起来像这样
....... 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://mwmymain.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 mwmydomain.tld; sub_filter_once off; } location https://zh.m.wikipedia.org/{ rewrite ^/(.*) https://mwmydomain.tld/$1 permanent; } }
mwdomain.tld和up.w.domain.tld的服务器configuration类似
无论如何我总是得到一个500内部服务器错误,并没有error.log信息
提前谢谢了:)
更新:我已经尝试删除最后的位置部分和类似的configuration工程谷歌,仍然没有线索:(