• 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!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • 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.

Question nginx reverse proxy directive for "location /" for specific domain only

davewood

New Pleskian
I want to proxy all requests on a specific domain to another server. (Plesk Obsidian)

i have a few sites configured

portal.example.com
foo.example.com
bar.example.com

all requests to portal.example.com should be proxied to portal.internalserver.com


Hosting Settings
hosting type: website

Apache & nginx Settings
nginx proxy mode: deactivated
Additional nginx directives:
Code:
location / {
    proxy_pass       http://portal.internalserver.com:8000;
    proxy_redirect   off;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Host $server_name;
}

this directive doesnt matche because its included after the default templates location directive.

custom templates seem to be the answer but I cannot figure out how to restrict a custom template to a specific subdomain.

Here are a few links that I came across while looking for an answer:
 
I'm also looking on a way to resolve this.

I'm hosting additional server, with dockered NextCloud instances and since my public IP addresses are limited I cannot assign one to to NextCloud machine to manage nginx vhosts there, and use default 443 port for hosting.
I've tried to proxy pass requests from subdomains to my NextCloud instance but to no avail.
Using Plesk would be not only technically easier but way more convenient - Plesk could manage LetsEncrypt certificartes, domains, and nginx logs...

So far I was able to proxy additional locations (not subdomains), like /nextcloud - as this does not duplicate location "/" in the nginx additional directives field.
 
Back
Top