1

I have a server running the following apps:

  • JIRA
  • Confluence

Each application has its own subdomain.

  • jira.thelavender.net
  • wiki.thelavender.net

I have managed to get JIRA working with its subdomain by configuring my VirtualHost as follows:

<VirtualHost *:80>
    ServerName jira.thelavender.net

    ProxyRequests Off
    ProxyVia Block
    ProxyPreserveHost On

    <Proxy *>
            Require all granted
    </Proxy>

    ProxyPass /jira http://thelavender.net:8080/jira
    ProxyPassReverse /jira http://thelavender.net:8080/jira

    # JIRA AJP Proxy Configuration:
    <Proxy *>
            Order deny,allow
            Allow from all
    </Proxy>

    ProxyRequests           Off
    ProxyPass               /       ajp://thelavender.net:8009/
    ProxyPassReverse        /       ajp://thelavender.net:8009/
</VirtualHost>

I then copied this configuration, renamed it to confluence.conf, edited the information so it matches that of Confluence. Made sure there was a correct symlink to the sites-enabled directory.

Restarted Apache Restarted Confluence

I can still get to Confluence by going to thelavender.net/wiki but whenever I goto wiki.thelavender.net JIRA ends up loading.

The only thing special I had to do to my JIRA / Tomcat server.xml was uncomment one line:

<Connector port="8009" redirectPort="8443" enableLookups="false" protocol="AJP/1.3" URIEncoding="UTF-8"/>

This line does not exist in the JIRA / Tomcat server.xml Looking at Atlassian documentation, there is no documentation that I have found that specifically talks about configuring Confluence for use with AJP. Documentation for JIRA and AJP exists however.

I thought perhaps adding" <Connector port="8009" redirectPort="8443" enableLookups="false" protocol="AJP/1.3" URIEncoding="UTF-8"/> to my JIRA server.xml would help. Confluence still starts up with no issue but I am still getting the JIRA login page.

What am I missing here?

EDIT

Looking at some other sites, it looked like when people have multiple apps running, they run them on different ports for their AJP config?

JIRA is configured as 8009. Based on that I configured Confluence for 8109. Now when I attempt to load wiki.thelavender.net I get a blank page.

Tailing the other_vhosts_access.log I seem to be getting an HTTP 404 error now: GET / HTTP/1.1" 404. The entire line is:

wiki.thelavender.net:80 xxx.xxx.xxx.xxx - - [23/Jul/2016:15:23:01 -0500] "GET / HTTP/1.1" 404 170 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_2 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13F69 Safari/601.1"

FINAL UPDATE

Ok so I went in and edited my virtual host file.

I changed:

ProxyPass               /       ajp://thelavender.net:8109/
ProxyPassReverse        /       ajp://thelavender.net:8109/

to

ProxyPass               /       ajp://thelavender.net:8109/wiki
ProxyPassReverse        /       ajp://thelavender.net:8109/wiki  

Restarted Confluence and now I can get to it by going to wiki.thelavender.net

Of course, everything is served behind /wiki but it works. Is there a specific reason I get a 404 error when its not using /wiki?

Martin
  • 311
  • 1
  • 2
  • 20

1 Answers1

0

Your confluence's context path is set to /wiki, so you have to access it via an url that ends with /wiki.

You're not serving anything at /, so that returns a 404 (not found).

If you don't want to use /wiki as your context path, then this KB article explains how you can update it.

GlennV
  • 3,471
  • 4
  • 26
  • 39