Welcome! Log In Create A New Profile

Advanced

Re: Jenkins reverse proxy on single domain with multiple apps

Francis Daly
February 25, 2018 10:36AM
On Sun, Feb 25, 2018 at 03:08:28AM -0500, kefiras@gmail.com wrote:

Hi there,

> I am trying to setup a reverse proxy on a single domain to host multiple
> apps separated by URI, for example:
> http://localhost/app1
> http://localhost/app2
> etc.

You will be much happier if your nginx/app1/ application believes that
it is installed at appserver/app1/, and not at appserver/.

> Right know having problems with reverse proxy jenkins which sends HTML page
> in HTTP reply with relative paths eg. /static/abc/css/common.css

For jenkins, use the jenkins "prefix" argument. For other apps, use
whatever their config/install options are.

> So far I have rewritten the content to the login screen as per below but I
> want to know if there is any other way to rewrite this automatically:

The easiest way is not to have to rewrite anything.

If jenkins is installed at /jenkins, then your nginx config will be
pretty much "proxy_pass http://jenkins:8080;", unless you specifically
want nginx to handle some of the static files instead of jenkins.

Good luck with it,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Jenkins reverse proxy on single domain with multiple apps

kefiras@gmail.com February 25, 2018 03:08AM

Re: Jenkins reverse proxy on single domain with multiple apps

Aziz Rozyev February 25, 2018 08:14AM

Re: Jenkins reverse proxy on single domain with multiple apps

kefiras@gmail.com February 26, 2018 09:58AM

Re: Jenkins reverse proxy on single domain with multiple apps

Francis Daly February 25, 2018 10:36AM

Re: Jenkins reverse proxy on single domain with multiple apps

kefiras@gmail.com February 26, 2018 10:03AM

Re: Jenkins reverse proxy on single domain with multiple apps

Aziz Rozyev February 26, 2018 11:04AM

Re: Jenkins reverse proxy on single domain with multiple apps

kefiras@gmail.com February 26, 2018 11:09AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 166
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