Ok I have a set up a working apache-virtual host configuration, which redirects the users on IP request. The setup is the following:
<VirtualHost *:80>
DocumentRoot "C:\wamp\www\dns"
ServerName ConnectToServer
ProxyRequests off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location />
ProxyPass http://localhost:8080/
ProxyPassReverse http://localhost:8080/
</Location>
The thing is that I want the apache server to redirect to the NodeJS server on request of a specific subdomain.
For example, apache will redirect to nodeJs server if the user requests www.stackoverflow.com but I want it to redirect to the server when a subdomain like www.stackoverflow.com/question is requested.
So, how to setup a Name-Based Virtual Host?
All I would like to know guys if this practice,making my server available through apache is good for production or should I find another solution like heroku or ngix? ?