• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Using an external reverse proxy (nginx) server -> Plesk Obsidian Almalinux

Edric2023

New Pleskian
Server operating system version
Almalinux 8
Plesk version and microupdate number
Plesk Obsidian Web Host edition 18.0.56
Hi there,

I have been struggling for the last few days with something.

The situation i want to achieve is as stated in this picture;
1700656679921.png


I am trying to achieve path based routing.

If i access test.com/website1 i would like to be connected to website1.text.com in plesk.

What i did was, i put the reverse proxy server inside of a virtual network with the plesk server. So an interface has been added. The following ips;

Reverse proxy server: 192.168.1.1
Plesk server: 192.168.1.2,192.168.1.3,192.168.1.4 (all on the lan interface)

Within plesk i connected the corresponding lan ip to a domain, and configured the reverse proxy server to send test.com/website1 to 192.168.1.2 for example.

This works perfect with one website. But when i try the same config with multiple websites (and also multiple ips) it doesn't work.
Is there any other way that is easier (Including my reverse proxy server) to configure this, or am i doing something wrong?
Proxy mode is enabled.



Thank you in advance.
 

Attachments

  • 1700656637311.png
    1700656637311.png
    9.3 KB · Views: 0
How did you set that up? location blocks with proxy_pass?
Hi there,

location /test {

proxy_pass http://192.168.1.2;

proxy_bind 192.168.1.1;

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-Proto $scheme;

}
 
Hi there, thank you for your reply.

I tried setting proxy_set_header Host $host; to proxy_set_header Host website1.text.com.

Is there any other way to achieve what i want to achieve? How do i push the correct website to the plesk server?
 
Back
Top