Welcome! Log In Create A New Profile

Advanced

Reverse proxy one domain

April 25, 2019 09:16AM
Hi.
I have one URL for all my websites, applications and so.
Let's say it's system.mydomain.com. Most of my websites is Apache + PHP and the applications is Tomcat. So far so good, no problem there.

My nginx config that's working for everything else:

server {
listen 80;
server_name system.mydomain.com;
....................
location /app1 {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
server_name system.mydomain.com;
....................
location /app1 {
proxy_pass http://app1.mydomain.com;
}
}
upstream app1.mydomain.com {
server SERVER_IP_HERE:8081 fail_timeout=60;
}

Ok, my problem is when I have Alfresco for example on the backend. Alfresco responds on (fictional IP) "http://192.168.0.10/share".
I need to acess my nginx reverse proxy (another machine in front of Alfresco) on the URL: "http://system.mydomain.com/alfresco" and it should consume "http://192.168.0.10/share".
In my configuration above, the error is that when I acess "http://system.mydomain.com/alfresco" it will consume "http://192.168.0.10/alfresco".
How can I configure this to work? Rewrite?
Subject Author Posted

Reverse proxy one domain

mrodrigom April 25, 2019 09:16AM

Re: Reverse proxy one domain

Aleksandar Lazic April 27, 2019 12:24PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 316
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready