Reverse proxy and custom context path not working as expected
Asked by Michael:

I have Jira Service Desk and Confluence running on the same server. This is my intended setup:

* support.mydomain.com -\> Service Desk
* support.mydomain.com/wiki -\> Confluence

Currently:

* support.mydomain.com works as expected. Visiting this address on port 80 loads Jira Service Desk which is listening on port 8080.
* support.mydomain.com/wiki does not work as expected. This takes me to a "Oops, you've found a dead link." page. However, **support.mydomain.com:8090/wiki does work**

Seeing as :8090/wiki works, I would assume the issue lies with either the confluence connector or my vhost configuration?

**Connector:**

```
 <
   Connector port="8090" 
   connectionTimeout="20000" 
   redirectPort="8443"
   maxThreads="48" 
   minSpareThreads="10"
   enableLookups="false" 
   acceptCount="10" 
   debug="0" 
   URIEncoding="UTF-8"
   protocol="org.apache.coyote.http11.Http11NioProtocol"    
   proxyName="support.mydomain.com" 
   proxyPort="80" 
   scheme="http" 
/>
```

**vhost:**

```
<VirtualHost *:80>    

   ServerName support.mydomain.com
   ProxyRequests Off    
   ProxyVia Off
   
   <Proxy *>         
    Require all granted    
   </Proxy>
    
   ProxyPass / http://127.0.0.1:8080/    
   ProxyPassReverse / http://127.0.0.1:8080/
    
   ProxyPass /wiki http://127.0.0.1:8090/wiki    
   ProxyPassReverse /wiki http://127.0.0.1:8090/wiki

</VirtualHost>
```

I would appreciate any guidance!

Thank you,

Michael


Answers:
author: Michael
body: I was pretty much there, just missed this crucial step in the proxy configuration!
> Uncomment the connector listed under the **HTTP - Proxying Confluence via Apache or Nginx over HTTP** heading.

<https://confluence.atlassian.com/doc/using-apache-with-mod_proxy-173669.html>

All sorted now, thanks!

![130d2d27ae83b9014737319b0bf34de8.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/100202iB90891D8BE756647/image-dimensions/360x133?v=v2 "130d2d27ae83b9014737319b0bf34de8.jpg")

comments: author: Diego
body: It is great to know that you managed to get it going! Let us know if there is anything else we could help you with.


author: Diego
body: Hello @!

As I understand, you need to access Confluence using the .../wiki context path while behind a reverse proxy.

Even though the Context Path is correctly set, we still need to set the Base URL so Confluence can work properly. You will need to access your Confluence via the **support.mydomain.com:8090/wiki** URL, from there, you should be able to set the Base URL.

You can check these documents here:
> * ++***[\[Confluence Server\] How to change the Confluence context path](https://confluence.atlassian.com/confkb/how-to-change-the-confluence-context-path-707985922.html)***++
> * ++***[\[Confluence Server\] How to use NGINX to proxy requests for Confluence](https://confluence.atlassian.com/confkb/how-to-use-nginx-to-proxy-requests-for-confluence-313459790.html)***++

I hope this helps!

comments: author: Michael
body: Hi thanks for responding. My base URL is currently set to *support.mydomain.com/wiki* but visiting that address does not work. I can only access my wiki by visiting *support.mydomain.com:8090/wiki* and when I land on the wiki it warns me:
> **Your URL doesn't match**
>
> Confluence's base URL is set to [http://support.mydomain.com/wiki but](http://support.mydomain.com/wiki??but) you are accessing Confluence from [http://support.mydomain.com:8090/wiki](http://support.mydomain.com:8090/wiki?).

So my base URL is already set to what I want it to be, I just can't visit on that URL. I guess I just need to figure out why I can't access confluence on the context path without the port 8090


Tags: jira-service-desk

proxy