configuring base url for confluence
Asked by Ilias Shaik:

Hi,

I have installed confluence on a Linux server and its currently accessible as follows.

http://\<IP Address\>\>:8090

I want to change the Base URL so that it can be accessible as follows

http://\<IP Address\>\>:8090/confluence

For this, the server.xml is already update with the below entry.

\<context path="/confluence" docBase="../confluence" debug="0" reloadable'"false" useHttpOnly="true"\>

And also, the Base URL is updated in confluence application to http://\<IP Address\>\>:8090/confluence

However, when am trying to access http://\<IP Address\>\>:8090/confluence, it says page not found and confluence is still accessible over http://\<IP Address\>\>:8090

Kindly check and update on this.

Regards,

Ilias S


Answers:
author: Moses Thomas
body: [@Ilias Shaik](/t5/user/viewprofilepage/user-id/1496340)see documetation here, [Configuring the Server Base URL](https://confluence.atlassian.com/doc/configuring-the-server-base-url-148592.html)and don't forget to restart confluence server after changes.

best!

comments: author: Ilias Shaik
body: Hi,  

As mentioned in the documentation. I have configured the context in server.xml and as well as change the Base URL in confluence application and then restarted the confluence application.  

However, it says Page not found while accessing through http://\<IPAddress\>:8090/confluence and its still accessible over http://\<\<IPAddress\>:8090  
Is there any other configuration file which needs to be updated?  

Regards,  
Ilias S


author: Moses Thomas
body: [@Ilias Shaik](/t5/user/viewprofilepage/user-id/1496340)Are you running your confluence behind reverse proxy server ?


author: Ilias Shaik
body: There is no reverse proxy configured. How can i verify if reverse proxy is configured.


author: Moses Thomas
body: [@Ilias Shaik](/t5/user/viewprofilepage/user-id/1496340)If you are using (Linux/Unix like OS) when you run

```
netstat -tulp
```

you will see whether ( nginx or apache proxy) is listening(state) you can check program name / PID

If you don't have it running behind a proxy server could you please show your full server.xml file?

best!


author: Ilias Shaik
body: Hi,  

I could see below while exeucuting "netstat -tulp" command on the linux server.  

tcp 0 0 \*:8090 \*:\* LISTEN 27860/java  

Below is the server.xml file. Kindly check and update on your findings.

\<Server port="8000" shutdown="SHUTDOWN" debug="0"\>  
\<Service name="Tomcat-Standalone"\>  
\<!--  
==============================================================================================================  
DEFAULT - Direct connector with no proxy, for unproxied HTTP access to Confluence.  

If using a http/https proxy, comment out this 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"/\>  
\<!--  
==============================================================================================================  
HTTP - Proxying Confluence via Apache or Nginx over HTTP  

If you're proxying traffic to Confluence over HTTP, uncomment the connector below and comment out the others.  
Make sure you provide the right information for proxyName and proxyPort.  

For more information see:  
Apache - <https://confluence.atlassian.com/x/4xQLM>  
nginx - <https://confluence.atlassian.com/x/TgSvEg>  

==============================================================================================================  
--\>  

\<!--  
\<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"  
scheme="http" proxyName="proxy.fednet.gov.ae" proxyPort="80"/\>  
--\>  

\<!--  
==============================================================================================================  
HTTPS - Direct connector with no proxy, for unproxied HTTPS access to Confluence.  

For more info see <https://confluence.atlassian.com/x/s3UC>  
==============================================================================================================  
--\>  

\<!--  
\<Connector port="8443" maxHttpHeaderSize="8192"  
maxThreads="150" minSpareThreads="25"  
protocol="org.apache.coyote.http11.Http11NioProtocol"  
enableLookups="false" disableUploadTimeout="true"  
acceptCount="100" scheme="https" secure="true"  
clientAuth="false" sslProtocol="TLSv1.2" sslEnabledProtocols="TLSv1.2" SSLEnabled="true"  
URIEncoding="UTF-8" keystorePass="\<MY_CERTIFICATE_PASSWORD\>"/\>  
--\>  

\<!--  
==============================================================================================================  
HTTPS - Proxying Confluence via Apache or Nginx over HTTPS  

If you're proxying traffic to Confluence over HTTPS, uncomment the connector below and comment out the others.  
Make sure you provide the right information for proxyName and proxyPort.  

For more information see:  
Apache - <https://confluence.atlassian.com/x/PTT3MQ>  
nginx - <https://confluence.atlassian.com/x/cNIvMw>  
==============================================================================================================  
--\>  

\<!--  
\<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"  
scheme="https" proxyName="\<subdomain\>.\<domain\>.com" proxyPort="443"/\>  
--\>  

\<Engine name="Standalone" defaultHost="localhost" debug="0"\>  
\<Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false" startStopThreads="4"\>  
\<Context path="" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true"\>  
\<!-- Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties --\>  
\<Manager pathname=""/\>  
\<Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60"/\>  
\</Context\>  

\<Context path="${confluence.context.path}/synchrony-proxy" docBase="../synchrony-proxy" debug="0"  
reloadable="false" useHttpOnly="true"\>  
\<Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60"/\>  
\</Context\>  
\</Host\>  
\</Engine\>  
\</Service\>  
\</Server\>

Regards,  
Ilias S


author: Moses Thomas
body: [@Ilias Shaik](/t5/user/viewprofilepage/user-id/1496340)

1. Change Base URL in **general configuration \> edit enter http://ipaddress:8090/confluence**which you already did.
2. Stop confluence
3. You have no reverse proxy OK, I see that you need to check context path here![Selection_013.png](https://community.atlassian.com/t5/image/serverpage/image-id/24388i4B24D202077A1E4A/image-size/large?v=v2&px=999 "Selection_013.png")
4. Save the server.xml file
5. You will need to kill current process so type**ps -aux \| grep confluence**
6. kill -9 PID(process id)
7. Restart confluence
8. **Try to access confluence via http://Ipadress:8090/confluence**

**it should work.**

**Best**


author: Ilias Shaik
body: Hi,

Please let me know if i can set it as follows in server.xml

\<Context path="http://\<IPAddress\>:8090/confluence" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true"\>

Regards,

Ilias S


author: Moses Thomas
body: [@Ilias Shaik](/t5/user/viewprofilepage/user-id/1496340)You can't give the path like this have you tried once again what i have sent '?


author: Nic Brough -Adaptavist-
body: I'm confused. The context path is relative to the base of the Tomcat server and has nothing to do with ports or ip addresses.

If that last sentence is a bit techy, yes, I understand, but I'm still not sure why you didn't just do what [@Moses Thomas](/t5/user/viewprofilepage/user-id/1138700) said, as that was correct and clear, even if you didn't understand what it was doing.


author: Ilias Shaik
body: Hi,

I have shutdown confluence, added below entry in server.xml and restarted confluence and its working as expected.

Please note that Base URL was already updated in confluence application.

\<Context path="/confluence" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true"\>

Thanks for your suggestion and inputs.

Regards,

Ilias S


author: Moses Thomas
body: [@Ilias Shaik](/t5/user/viewprofilepage/user-id/1496340)Good that you have confluence as you wanted, please **accept solution/ vote**so others could benefit from similar issues such as this.

Best!


author: Ilias Shaik
body: Hi,

Below is the solution

1) Configure Base URL in Confluence application

2) Shutdown confluence,

3) added below entry in server.xml

\<Context path="/confluence" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true"\>

4) restarted confluence and its working as expected.

Please note that Base URL was already updated in confluence application.

comments: author: Moses Thomas
body: [@Ilias Shaik](/t5/user/viewprofilepage/user-id/1496340)This is what i have posted in **Atlassian documentation/ written form,** read solution posted. I even made screen pointing where you need to add context path ( **/confluence**) but i can see that some one is not reading help, our help is from the fact that we Love Atlassian stack and we are willing to help others.

Best.