Nginx配置
来源:互联网 发布:单片机与串口调试助手 编辑:程序博客网 时间:2024/06/05 08:34
- 介绍
Nginx经常作为代理服务器使用。
- 配置文件
Ubuntu下的路径是:/etc/nginx/sites-enabled/default
- 代理
[codesyntax lang="php"]
server { listen 80; server_name surenpi.com; location / { proxy_pass http://surenpi.com:1234; proxy_redirect default; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $http_connection; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } }
[/codesyntax]
server_name如果是二级域名的话,还可以实现将二级域名映射到不同的web应用上。
- 杂项
如果你不希望在返回的http协议头中显示Nginx版本号,可以看这篇文章。
查看原文:http://surenpi.com/2015/11/27/nginx%e9%85%8d%e7%bd%ae/
0 0
- Varnish+Nginx 配置----Nginx
- Nginx-配置-nginx.conf
- 【Nginx】Nginx配置优化
- 105 nginx nginx 配置
- nginx nginx.conf 配置
- nginx 配置
- nginx 配置
- Nginx配置
- nginx配置
- NGINX配置
- nginx配置
- Nginx配置
- nginx配置
- nginx配置
- nginx 配置
- nginx 配置
- nginx配置
- Nginx配置
- 第十三周 项目3-Dijkstra算法的验证
- 你可能不知道的事(服务器返回 id)
- python nonzero()
- AEAI HR V1.5.1升级说明,开源人力资源管理系统
- 第十二周项目3 图遍历算法实现(2)
- Nginx配置
- C4819:该文件包含不能在当前代码页中表示的字符。请将该文件保存为Unicode格式以防数据丢失
- 第十二周项目4 利用遍历思想求解图问题(1)
- 安装Flash Player 调试版本简单方式(安装的Adobe Flash Player不是调试器)
- 第十二周 项目一-算法库的建立
- 第七周项目6-停车场模拟
- git学习教程
- 第十二周--数据结构--输出出图G中每个顶点的出度
- 第十三周项目1最小生成树的普里姆算法