It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

configuring base url for confluence

Ilias Shaik Jun 11, 2018

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

3 votes
Moses Thomas Jun 11, 2018

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

 

best!

Ilias Shaik Jun 11, 2018

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

Moses Thomas Jun 11, 2018

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

Ilias Shaik Jun 11, 2018

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

Moses Thomas Jun 11, 2018 • edited

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

Ilias Shaik Jun 11, 2018

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

Moses Thomas Jun 11, 2018

@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

Ilias Shaik Jun 11, 2018

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

Moses Thomas Jun 11, 2018 • edited

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

Nic Brough [Adaptavist] Community Leader Jun 11, 2018

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.

Ilias Shaik Jun 12, 2018

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

Moses Thomas Jun 12, 2018

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

 

Best!

0 votes
Ilias Shaik Jun 12, 2018

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.

Moses Thomas Jun 12, 2018

@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
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Confluence

Confluence CVEs and common questions

Two vulnerabilities have been published for Confluence Server and Data Center recently: March 20, 2019 CVE-2019-3395 / CVE-2019-3396 April 17, 2019 CVE-2019-3398 The goal of this article is...

909 views 0 19
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you