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 wondering if it's possible to use Apache as my webserver (so it serves the pages) and use Node.js to dynamically create the web pages (this is for a web app I am creating)?
So in other words can they work hand in hand just like Apache/Perl or Apache/PHP etc..
Best Answer
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:
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
and restart apache2 service.