I have a server behind the corporate firewall with only port 80 open. Is there any way to run Apache and Node.js separately on the same domain, but different urls? For example, can I run Apache on mydamain.com
and Node on mydomain.com/vcard
?
Node.js and Apache on the same server, but different urls
apache-2.2configurationnode.js
Related Topic
- Does it make sense to reverse proxy Node.js through Apache
- Nginx – Node.js apps and wordpress on the same vps
- Apache – One VirtualHost for Certain URLs, Another for All Other URLs
- Ubuntu – How to run Apache Tomcat and Node.JS servers at the same time
- SSL – Apache and Node.js on the same Amazon EC2 instance
- SSL Permission Error: Node.js with HTTPS + Let’s Encrypt SSL + Apache + Non-Root User
Best Answer
You can. You have 3 possible setups:
Given that Apache is your corporate server, the second way is the safest. Read the documentation on Apache mod_proxy module on how to do so. You can have either a separate "folder" for Node (e.g. all requests to http://yourcompany.com/node/blabla are served by node while all other requests are served by Apache, or you can have a separate virtual host for Node.