We have an Apache Webserver installed on a machine which also serves pages using Perl.
For a project I\'ve decided to use Node.js instead of Perl/Ruby. Just wonderin
Hosting a nodejs site through apache can be organized with apache proxy module.
It's better to start nodejs server on localhost with default port 1337
Enable proxy with a command:
sudo a2enmod proxy proxy_http
Do not enable proxying with ProxyRequests until you have secured your server. Open proxy servers are dangerous both to your network and to the Internet at large. Setting ProxyRequests to Off does not disable use of the ProxyPass directive.
Configure /etc/apche2/sites-availables with
ServerAdmin admin@site.com
ServerName site.com
ServerAlias www.site.com
ProxyRequests off
Order deny,allow
Allow from all
ProxyPass http://localhost:1337/
ProxyPassReverse http://localhost:1337/
and restart apache2 service.