Centos 6 用nginx代理实现node.js虚拟主机
来源:互联网 发布:淘宝网店营销策划方案 编辑:程序博客网 时间:2024/05/20 20:47
首先需要安装nginx
rpm -Uvh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpmyum install nginx#启动nginx#关闭ps -ef | grep nginxkill -QUIT 进程号#重启nginx -s reload
修改配置文件,配置虚拟主机
修改配置文件,配置虚拟主机
nginx 安装后,配置文件的默认路径是:
/etc/nginx/conf.d
添加配置文件:
# the nginx server instanceserver { listen 0.0.0.0:80; server_name domain.com www.domain.com; access_log /home/log/domain/nginx.log; # pass the request to the node.js server with the correct headers and much more can be added, see nginx config options location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://127.0.0.1:8888/; proxy_redirect off; } }
- Centos 6 用nginx代理实现node.js虚拟主机
- 用node.js替代nginx做反向代理
- 用nginx做node.js的反向代理
- 使用 nginx + node.js 反向代理
- Nginx反向代理Node.js-https
- nginx、apache实现代理功能与直接访问node.js站点
- 通过 Nginx 反向代理部署 Node.js 服务
- nginx虚拟主机实现原理
- Nginx实现虚拟主机
- Nginx实现虚拟主机配置
- node.js代理设置
- Nginx虚拟主机及反向代理配置
- Nginx 反向代理 负载均衡 虚拟主机配置
- nginx 反向代理到node
- centos使用nginx反向代理实现负载均衡
- centos安装node.js
- centos 安装node.js
- CentOs安装node.js
- 幸福
- QT笔记:ambiguous column name:
- nginx处理web请求分析
- 通过sql文件将数据导入mysql数据库中
- hdu 1257 最少拦截系统(最长单调递增序列)
- Centos 6 用nginx代理实现node.js虚拟主机
- 【二分】Honeymoon Hike
- ubuntu 降级 gcc 版本到3.4
- 筛简历随感
- linux中sleep函数使用
- 浅析container_of(ptr, type, member)
- ExpandableListView实例(一)_数据库增删改查处理和listitem点击长按处理
- 宁波工程学院校赛解题报告
- 抓住时机