nginx简单反向代理实现
在NFS服务器对目录进行发布
vi /etc/exports/opt/xcw 10.11.80.*(rw,sync,no_root_squash) service nfs restart
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
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; }