apache代理服务器为nodejs服务设置域名

本机以apache为主,其中

在httpd.conf中先设置

<VirtualHost *:80>
ServerName nodejs.cc
ServerAlias www.nodejs.cc
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location />
ProxyPass http://localhost:3000/
ProxyPassReverse http://localhost:3000/
</Location>
</VirtualHost>

 然后在hosts文件中

127.0.0.1 nodejs.cc

其中,重要文章观看

https://cnodejs.org/topic/50f90289df9e9fcc58a5015c   通过 Apache 代理访问 Node

http://www.cnblogs.com/plusice/p/3484597.html  apache代理服务器为nodejs服务设置域名

http://blog.csdn.net/zhangxin09/article/details/37663091   用 nodejs 做反向代理服务器

http://www.nodebeginner.org/index-zh-cn.html    Node入门(一本很好的书)

http://www.zhihu.com/question/27518523?sort=created    如何让apache和nodejs共用80端口?

原文地址:https://www.cnblogs.com/chenguiya/p/4703150.html