- apt-get install subversion
- cd /root
- git clone git://github.com/cnken/substitutions4nginx.git
- wget http://soft.vpser.net/lnmp/upgrade_nginx.sh
在upgrade_nginx.sh 96行加入
- --with-http_sub_module --add-module=/root/substitutions4nginx
注意--with-http_sub_module 前要有空格
sh upgrade_nginx.sh 按提示输入个版本号,如 1.12.1,回车
反向代理配置如下:
- server {
- listen 80;
- server_name ku.im;
- location / {
- subs_filter 80host.com ku.im; #替换原域名
- 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://down.80host.com;
- proxy_set_header Host down.80host.com;
- proxy_pass http://down.80host.com; #被代理网站的网址
- proxy_set_header Accept-Encoding "";
- }
- access_log /home/wwwlogs/ku.im.log;
- }

LuckTang's Blog 站长语录
LuckTang's Blog,欢迎各位来访!这是我的QQ,扫一扫,加好友。大家一起交流博客建站技术,分享前沿资讯!
评论