首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 开源软件 >

nginx容易反向代理实现

2012-06-28 
nginx简单反向代理实现在NFS服务器对目录进行发布vi /etc/exports/opt/xcw 10.11.80.*(rw,sync,no_root_sq

nginx简单反向代理实现
在NFS服务器对目录进行发布

vi /etc/exports/opt/xcw 10.11.80.*(rw,sync,no_root_squash) service nfs restart

4、登录静态WEB服务器
mkdir attachmentmount -t nfs 10.11.80.226:/home/attachment /var/www/ku/attachmentmkdir avatarmount -t nfs 10.11.80.226:/home/avatar /var/www/ku/avatarmount -t nfs 10.10.70.90:/var/avatar /var/www/ku/90/avatarmount -t nfs 10.10.70.90:/var/attachment /var/www/ku/90/attachment


6、登录主WEB服务器进行反向代理目录
   location /attachment/        {          proxy_pass http://10.11.80.223/attachment/;          proxy_set_header Host $host;        }   location /ucenter/data/avatar/        {          proxy_pass http://10.11.80.223/avatar/;          proxy_set_header Host $host;        }

热点排行