• 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 Setup reverse proxy(apache2 or nginx)

TheDanniCraft

New Pleskian
I've running a server with backend that should be accesed with an reversed proxy.
I've created a new .conf file in /etc/apache2/sites-availabe then I entered the following config:
<VirtualHost _default_:80> ServerName panel.example.com ProxyPreserveHost On ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/ RewriteEngine on RewriteCond %{HTTP:Upgrade} websocket [NC] RewriteCond %{HTTP:Connection} upgrade [NC] RewriteRule .* ws://localhost:8080%{REQUEST_URI} [P] </VirtualHost>
and copied it into /etc/apache2/sites-enabled.
Then I restarted apache.

But when I open the url only the deafault page appeared.

Now ive seen that Plesk has a nginx reverse proxy pluggin. I downloaded and installed it.
Only in the folder where the nginx files are located, the corresponding order(sites-availibe and sites-enabled) is missing.

Now I do't know how to setup the reverse proxy.
 

Attachments

  • 52CE1553-DA26-4CDD-B6FA-34341E203383.jpeg
    52CE1553-DA26-4CDD-B6FA-34341E203383.jpeg
    407.4 KB · Views: 12
I would recommend you to setup the reverse proxy without plugin, as it is easier.
Just go into the "additional apache and nginx settings" for your (sub)domain and enter the following to the "additional nginx directives" (at the bottom):
Code:
location / {
    proxy_pass http://127.0.0.1:9091/;
}
Just replace the 127.0.0.1 with your target server's ip and the 9091 with the desired port.

Don't forget to set up a ssl certificate on the target server too, without your data will be transferred between your plesk server and the target server unencrypted (which isn't bad if you limit the access to the port only to your plesk server by the firewall).
 
I would recommend you to setup the reverse proxy without plugin, as it is easier.
Just go into the "additional apache and nginx settings" for your (sub)domain and enter the following to the "additional nginx directives" (at the bottom):
Code:
location / {
    proxy_pass http://127.0.0.1:9091/;
}
Just replace the 127.0.0.1 with your target server's ip and the 9091 with the desired port.

Don't forget to set up a ssl certificate on the target server too, without your data will be transferred between your plesk server and the target server unencrypted (which isn't bad if you limit the access to the port only to your plesk server by the firewall).
This gives me this error:
Ungültige nginx-Konfiguration: nginx: [emerg] duplicate location "/" in /var/www/vhosts/system/panel.thedannicraft.de/conf/vhost_nginx.conf:1 nginx: configuration file /etc/nginx/nginx.conf test failed
 
This gives me this error:
Ungültige nginx-Konfiguration: nginx: [emerg] duplicate location "/" in /var/www/vhosts/system/panel.thedannicraft.de/conf/vhost_nginx.conf:1 nginx: configuration file /etc/nginx/nginx.conf test failed
Sorry, I forgot to mention you have to disable the "Proxy mode" within the additional apache & nginx settings" (a little above).
 
Back
Top