1

The apache server is configure with following items :

<VirtualHost *:80>
...
<IfModule mod_proxy.c>
ProxyRequests Off
ProxyPreserveHost On

ProxyPass /jenkins/ http://localhost:8080/ timeout=300
ProxyHTMLURLMap http://localhost:8080 /jenkins
<Location /jenkins/>
  ProxyPassReverse  /
  ProxyHTMLEnable   On
  ProxyHTMLExtended On
  ProxyHTMLURLMap   /       /jenkins/ [L]
  RequestHeader     unset   Accept-Encoding
</Location>

ProxyPass /nexus/ http://localhost:8081/ timeout=300
ProxyHTMLURLMap http://localhost:8081 /nexus
<Location /nexus/>
  ProxyPassReverse  /
  ProxyHTMLEnable   On
  ProxyHTMLExtended On
  ProxyHTMLURLMap   /      /nexus/ [L]
  RequestHeader     unset  Accept-Encoding
</Location>

ProxyVia On
</IfModule>

Jenkins proxy works fine.

Nexus proxy load the page but cannot load resources. The HTML page ressources are not defined with the right path, instead of myhost.domain/nexus/static/... the URLs are myhost.domain/static/.... What's going wrong in the configuration ?

ruddy32
  • 31
  • 3
  • Just checking first, have you enabled the context path for Nexus Repository 3 to be /nexus? By default it is /. – DarthHater Nov 07 '16 at 20:52
  • In my case the default nexus path is used. 'http://myhost/nexus' is the public path, and 'localhost:8081/' the local path. Is it necessary to use /nexus in the case of proxy ? – ruddy32 Nov 08 '16 at 07:51

1 Answers1

2

The solution is to switch Nexus context path configuration to '/nexus/'. In general, it seems that the nexus context path must match the proxy context path.

ruddy32
  • 31
  • 3