Many of the latest web frameworks (such as Node.js) don’t directly integrate into Parallels Plesk or any of the other web control panel systems. However, if you’ve setup the framework and have it running on your VPS, you can still take advantage of Plesk to manage your system. This is also applicable if you have a standalone application which provides a native HTTP interface and need to run it through your standard server.
One way to achieve this is to take advantage of the Apache mod_proxy to present this by proxying it through your existing website. This way, it will run on the standard port 80 and you can run other websites along side it.
- After logging into Plesk, select the domain you want to add the proxy to.
- If it’s not already expanded, select the Show More link:
- Click on the Web Server Settings button in the expanded view:
- Under the Additional Apache directives, you can then add the following code:
<Location /> ProxyPass http://localhost:4321/ ProxyPassReverse http://localhost:4321/ </Location>
This assumes your Node.js (or similar backend system) is listening on port 4321 on the localhost. If you have specified a different port number in your application, you’ll need to ensure it matches here. The result should look like this:
- Click on the OK button to save the config and force Apache to reload it. You should then be able to view your application from a browser with it being proxied through Apache.