码迷,mamicode.com
首页 > 其他好文 > 详细

nginx反向代理配置

时间:2017-07-04 13:19:28      阅读:118      评论:0      收藏:0      [点我收藏+]

标签:nginx反向代理配置

1.修改nginx.conf配置文件,在 location / {这个行下添加反向代理

 location / {
    proxy_pass http://192.168.2.140:8080/;#就是这行代码
    auth_basic off;
    auth_basic_user_file /var/user;
    root   html;
    index  index.html index.htm;
 }


2.测试访问

http://www.nginx1.com:9527/


本文出自 “素颜” 博客,请务必保留此出处http://suyanzhu.blog.51cto.com/8050189/1944299

nginx反向代理配置

标签:nginx反向代理配置

原文地址:http://suyanzhu.blog.51cto.com/8050189/1944299

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!