Overview

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.

Instructions

  1. After logging into Plesk, select the domain you want to add the proxy to.
  2. If it’s not already expanded, select the Show More link:
    plesk 12 - domains - show more
  3. Click on the Web Server Settings button in the expanded view:
    plesk 12 - web server settings
  4. Under the Additional Apache directives, you can then add the following code:
    <Location />
        ProxyPass https://localhost:4321/
        ProxyPassReverse https://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:
    plesk proxy - apache directives

    You can also just specify a certain directory to proxy, eg “<Location /test1>” and this will only proxy requests for /test1.

  5. 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.
Was this article helpful?

Related Articles