标签:12.13 Nginx防盗链 12.14 Nginx访问控制 12.15 Nginx解析php相关配 12.16 Nginx代理
12.13 Nginx防盗链测试结果:
配置Nginx代理(此例中proxy.conf就相当于代理服务器):
cd /usr/local/nginx/conf/vhost
vim proxy.conf //加入如下内容
server
{
listen 80;
server_name ask.apelearn.com;
location /
{
proxy_pass http://47.91.145.78/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
扩展学习:
502问题汇总
http://ask.apelearn.com/question/9109
location优先级
http://blog.lishiming.net/?p=100
标签:12.13 Nginx防盗链 12.14 Nginx访问控制 12.15 Nginx解析php相关配 12.16 Nginx代理
原文地址:http://blog.51cto.com/13517946/2087292