• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Plesk 12.5 Nginx port forward to Node app

DavidBWieler

New Pleskian
Trying to proxy_pass Nginx to a node app, but nothing I do works.

I've tried to add my "location / {}" to
include "/var/www/vhosts/system/example.com/conf/vhost_nginx.conf";

but it gives me an error saying that it's a duplicate.

I've also tried adding the new routing to "Additional nginx directives", but it gives me the same error.

I also tried adding, "location ^~ /$ {}"

But that does nothing as well, but I get no errors with this one.

I need to force Nginx to port forward everything on port 80 and 443, (I have a working SSL Cert that DOES work if I go directly to my node app, https://example.com:3000).

How can I get Plesk's Nginx configs to proxy_pass everything to my node app? I've also tried installing JXCore's Node Extension. I get an error, and their support people dont respond to questions.
 
You should try and use something like...

Additional nginx directives
Code:
location = / {
return 301 https://domain.tld:3000;
}

I hope that helps
Regards

Lloyd
 
Is it possible to also forward parameters?


Additional nginx directives
Code:
location = / {
return 301 https://domain.tld:3000;
}

So far this works for me, I modified your example like this:

Code:
location = / {
    return 301 http://52.55.142.120:10080/api/download;
}

So externally I use a subdomain call, like https://mysub.domain.tlg which by this directive successfully routes to a webapp, listening on port 10080

Is it possible to forward parameters? Like in such external call: https://mysub.domain.tlg?param1=this&param2=that

Example?
 
Last edited:
Back
Top