The Apache proxy server sets the domain name for the Nodejs service

Source: Internet
Author: User

This machine is based on Apache, where

In httpd.conf, first set the

<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>

Then in the Hosts file

127.0.0.1 nodejs.cc

Among them, important articles to watch

https://cnodejs.org/topic/50f90289df9e9fcc58a5015c Access Node via Apache proxy

http://www.cnblogs.com/plusice/p/3484597.html Apache proxy Server Set domain name for Nodejs service

http://blog.csdn.net/zhangxin09/article/details/37663091 using Nodejs to do reverse proxy server

http://www.nodebeginner.org/index-zh-cn.html Node Primer (a very good book)

http://www.zhihu.com/question/27518523?sort=created How do I get Apache and Nodejs to share port 80?

The Apache proxy server sets the domain name for the Nodejs service

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.