Installing jira and confluence behind apache on same server
Asked by Kenneth Nor:

Hi

I'm trying to set up jira and confluence on the same server behind apache on ubuntu linux with mysql database but do not get it to work.

I did follow the instructions on how to do this and get it to somewhat work. I also google the symptoms im having and tried different setups with no luck.

The problem is that i get Proxy Errors like this ones.

```
Proxy Error The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET /jira/.Reason: Error reading from remote serverProxy Error The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET /jira/browse/DEMO-1. Reason: DNS lookup failure for: mydomain.com
```

**I do not get this on every request, but it works once in a while and there is all over the jira site and not on spesefic pages.**

**My network is set up like this.**

Running dynamic dns on my domain and port forward 8090 (confluence) and 8070 (jira) to my server thru the firewall.

I also have a "normal" site running in /var/www/ that runs on port 80 that works just fine.

**This is my apache setup :**

```
&lt;VirtualHost *:80&gt;        ServerAdmin webmaster@localhost        DocumentRoot /var/www        &lt;Directory /&gt;                Options FollowSymLinks                AllowOverride None        &lt;/Directory&gt;        &lt;Directory /var/www/&gt;                Options Indexes FollowSymLinks MultiViews                AllowOverride None                Order allow,deny                allow from all        &lt;/Directory&gt;        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/        &lt;Directory "/usr/lib/cgi-bin"&gt;                AllowOverride None                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch                Order allow,deny                Allow from all        &lt;/Directory&gt;&lt;Proxy *&gt;        Order deny,allow        Allow from all&lt;/Proxy&gt;ProxyRequests           OffProxyPreserveHost       OnProxyPass                    /jira        http://mydomain.com:8070/jiraProxyPassReverse        /jira        http://mydomain.com:8070/jira
```

**This is my server.xml**

```
Right now i have not set up Confluence since i uninstalled and run the setup on jira 
```

```
first due to this issue i'm having. The problem presist with only Jira running.
```

```
&lt;Service name="Catalina"&gt;        &lt;Connector port="8070"                   maxThreads="150"                   minSpareThreads="25"                   connectionTimeout="20000"                   enableLookups="false"                   maxHttpHeaderSize="8192"                   protocol="HTTP/1.1"                   useBodyEncodingForURI="true"                   redirectPort="8443"                   acceptCount="100"                   disableUploadTimeout="true"                   proxyName="mydomain.com"                    proxyPort="80"/&gt; &lt;Engine name="Catalina" defaultHost="localhost"&gt;            &lt;Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"&gt;                &lt;Context path="/jira" docBase="${catalina.home}/atlassian-jira" reloadable="false" useHttpOnly="true"&gt;
```


Answers:
author: Andris Grinbergs
body: Hi,

If you have apache and jira running on same server, try using

`http:``//127.0.0.1``:8070``/jira`

instead of

`http:``//mydomain``.com:8070``/jira`

in ProxyPass line.

Also I would not recomend using 2 applications in one virtualhost. Better use different IPs or Ports or name based virtualhosts.

BR,

Andris.


author: Kenneth Nor
body: wow, thnx, changing proxypass to localhost did the trick.

Going to change to name based virtualhosts, but wanted to work in the same file when trying to figure this out.

Best regards and have a splendid day.

--

Kenneth


Tags: apache

jira

mod_proxy

proxy