node js +forever+ nginx 搭建高性能web服务器
2017-02-04 11:17
771 查看
一、linux node js安装
yum install npm (安装node js运行环境)
node -v 查看node的版本
node app.js& 后台测试node是否运行
访问域名 测试
二、安装forever,使node作为服务运行在服务器后台
npm install forever -g (安装forever)
yum install npm (安装node js运行环境)
node -v 查看node的版本
node app.js& 后台测试node是否运行
访问域名 测试
二、安装forever,使node作为服务运行在服务器后台
npm install forever -g (安装forever)
$ sudo npm install forever -g #安装 $ forever start app.js #启动 $ forever stop app.js #关闭 $ forever start -l forever.log -o out.log -e err.log app.js #输出日志和错误
命令语法及使用 https://github.com/nodejitsu/forever
三、Nginx作为代理服务器转发node 请求
server { listen 80; server_name node.csdssd.com; index index.html index.htm index.php; #root /www/maitianshe/web/; location / { proxy_pass http://127.0.0.1:3100; } access_log /www/log/nginx/node.log; }
相关文章推荐
- node js +forever+ nginx 搭建高性能web服务器
- Ubuntu的web服务器搭建系列之Nginx(JDK+Tomcat+MySQL+Nginx+Redis+NodeJS)
- Ubuntu搭建web服务器系列之JDK(JDK+Tomcat+MySQL+Nginx+Redis+NodeJS)
- Ubuntu的web服务器搭建系列之MySQL(JDK+Tomcat+MySQL+Nginx+Redis+NodeJS)
- Ubuntu的web服务器搭建系列之Redis(JDK+Tomcat+MySQL+Nginx+Redis+NodeJS)
- Ubuntu搭建web服务器系列之Tomcat(JDK+Tomcat+MySQL+Nginx+Redis+NodeJS)
- Ubuntu的web服务器搭建系列之MySQL(JDK+Tomcat+MySQL+Nginx+Redis+NodeJS)
- CentOS7 + node.js + nginx + MySQL搭建服务器全过程
- 搭建高性能Web服务器Nginx,10倍于Apache---Nginx+Php(FastCgi模式)
- 搭建高性能Web服务器Nginx,10倍于Apache---Nginx+Php(FastCgi模式)
- 利用node.js搭建简单web服务器的方法教程
- 建立node.js服务器(使用express搭建Web环境)
- Nginx 0.7.x + PHP 5.2.6(FastCGI)搭建高性能web服务器
- CentOS+Nginx+PHP+MySQL 搭建高性能的web服务器
- Node.js 搭建Web服务器和Web客户端
- 【node.js】使用node.js搭建一个本地web服务器
- Node.js搭建Web服务器
- Nginx+Nodejs搭建图片服务器
- CentOS+Nginx+PHP+MySQL 搭建高性能的web服务器