configuring base url for confluence

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

2 answers

@Ilias Shaiksee documetation here,  Configuring the Server Base URL and don't  forget  to  restart  confluence server after changes.

 

best!

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

@Ilias ShaikAre you  running  your confluence behind reverse proxy server ?

There is no reverse proxy configured. How can i verify if reverse proxy is configured.

@Ilias ShaikIf 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!

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

@Ilias Shaik

  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  hereSelection_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

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

@Ilias ShaikYou can't give the path like  this have you  tried once again what  i have sent '?

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 said, as that was correct and clear, even if you didn't understand what it was doing.

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

@Ilias ShaikGood  that  you  have confluence as you  wanted, please  accept  solution/ vote so  others could benefit from  similar  issues such  as this.

 

Best!

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.

@Ilias ShaikThis 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.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted yesterday in Confluence

Calling all marketing teams who use Confluence - we want to hear from you!

Hi Community! me again 🙂 If you’re a marketing team using Confluence, we want to hear your story! How did you start using Confluence? What are your use cases? What have been some of the benefits?...

131 views 3 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you