Articles in this section

How to pass requests from a Plesk hosted domain to the application listening on a local port?

kb: how-to Plesk Obsidian for Linux

Applicable to:

  • Plesk Obsidian for Linux

Question

How to forward requests from the domain to an specific application running locally on a given port?
How to make the application content available by browsing the domain?

Answer

  1. Log into Plesk

  2. Go to Domains > example.com > Dashboard > PHP
  3. Uncheck the PHP Support option
  4. Press OK
  5. Go to Domains > example.com > Hosting & DNS > Apache & nginx Settings.

  6. Uncheck the Proxy mode option.

  7. Press Apply button to apply the changes.
  8. Add the following lines into Additional nginx directives:

    location / {
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header Host $http_host;
    proxy_pass http://127.0.0.1:3000;
    }

    Note: Replace 3000 with the corresponding port number where the application listen.

  9. Press OK button to apply the changes.

Was this article helpful?

Comments

1 comment
Date Votes
  • nginx: [emerg] duplicate location “/” in /var/www/vhost/system/domain/com/vhost_nginx.conf:1

    nginx.configuration file /etc/nginx/nginx.conf test failed

    0

Please sign in to leave a comment.