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:
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 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:
Changing Virtual Hosts Settings Using Configuration Templates
You can change the settings of virtual hosts running on the Plesk server, for example, set custom error pages (simila...
docs.plesk.com
Plesk Help Center
support.plesk.com
Appendix A: Configuration Templates Structure
A set of configuration template files is structured as follows, assuming that the root folder is default/ or custom/....
docs.plesk.com
Nginx configuration for vhosts
How can I customize/add a configuration for a vhost in nginx. I want to put proxy_pass for Node.js into a subdomain of a vhost. All files I look it says: DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY
talk.plesk.com
Unable to add "location /" to additional nginx directives for domain in Plesk: nginx: [emerg] duplicate location "/"
Applicable to: Plesk Onyx for Linux Symptoms nginx is enabled as the reverse proxy in Plesk. If try adding the below directives in Plesk in Domains > example.com > Apache & nginx S...
support.plesk.com