读书人

nginx容易反向代理实现

发布时间: 2012-06-28 15:20:03 作者: rapoo

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;        }

读书人网 >开源软件

热点推荐