Welcome! Log In Create A New Profile

Advanced

proxy_pass problem

Posted by geroldboehler 
proxy_pass problem
September 30, 2013 05:02AM
Hi,

i have the following snippet running on host a.com, which proxys request to the server b.com for certain locations. Also it checks if static files in the system folder are available on host a.com and if not it loads them from host b.com

until now host a.com and b.com were on 2 different servers. i had to move host b.com on to the same machine as a.com and now this doesn't work anymore... The only difference is that a.com and b.com have the same ip address now.

any help would be greatly appreciated!

regards,
Gerold


location ~ (/de|/en) {
access_log off;
proxy_pass http://b.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location ~ (/system) {
error_page 404 =200 @backend;
}

location @backend {
access_log off;
proxy_pass http://b.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_intercept_errors on;
proxy_redirect off;
}
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 169
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready