Nginx 反向代理配置
2016-03-26 16:45
465 查看
# /etc/nginx/sites-enabled/demo # 名称随意 需与proxy_pass后对应 upstream demo_example_com { # 实际访问的服务器地址和端口 server localhost:8080; } server { listen 80; # 用户访问的地址 server_name demo.example.com; # 此处 / 可为其他路径 location / { # HTTP reverse proxy 需与 upstream 对应 proxy_pass http://demo_example_com; proxy_redirect off; proxy_http_version 1.1; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } }
相关文章推荐
- Ubuntu 默认壁纸历代记
- Ubuntu Remix Cinnamon 20.04 评测:Ubuntu 与 Cinnamon 的完美融合
- Linux socket 初步
- 关于Ubuntu 11.10启动提示waiting for the network configuration的问题
- 在 Ubuntu 桌面中使用文件和文件夹
- Linux Kernel 4.0 RC5 发布!
- nginx代理指定目录
- linux lsof详解
- linux 文件权限
- Linux 执行数学运算
- 10 篇对初学者和专家都有用的 Linux 命令教程
- Linux 与 Windows 对UNICODE 的处理方式
- Ubuntu12.04下QQ完美走起啊!走起啊!有木有啊!
- 解決Linux下Android开发真机调试设备不被识别问题
- ubuntu下chrome无法同步问题解决
- 访问Nginx发生SSL connection error的一种情况
- 运维入门
- 运维提升