Author:zumikua Updated at:2015-10-31 09:58:59 UTC
最近DigitalOcean的国内线路十分不稳定,疑似被墙。出于各种各样的考虑,决定使用ChicagoVPS的VPS做一个反向代理来提高访问速度。
关于反向代理的一些说明:
设置代码基本上是长这样的,因为那个服务器上自带了apache,所以我也懒的换成其他的server。顺便一说apache的配置文件比nginx好写了不止一个档次。
不过apache也有一些问题,比如这里的SetOutputFilter,一开始并没有人提到要加上这一个命令,于是经过漫长的搜索尝试等等终于找到了[这个问题](http://stackoverflow.com/questions/3479061/i-cant-seem-to-get-mod-proxy-html-working-at-all-no-debug-output-no-errors)。顺便你没看错,mod_proxy_html是不会输出log的,这点也是让我郁闷了半天。
````
ServerAdmin i@zumikua.in
ServerName zumikua.in
ServerAlias www.zumikua.in
ProxyPass / http://do.zumikua.in/
ProxyPassReverse / http://do.zumikua.in/
ProxyHTMLURLMap http://do.zumikua.in/ /
SetOutputFilter proxy-html
````