I am using a digital ocean droplet (Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-52-generic x86_64)) to host both jira and confluence. They are started on the same ip but different ports. I wanted to access them using jira.team.domain.com and confluence.team.domain.com so I went for the reverse proxy solution, using apache 2.4.7.
Things went really good and I had them working pretty fast. The issue is that after a couple of days, for a certain amount of time, the reverse proxy is not working and I get 'hostname not resolved' in the browser. I checked and the jira and confluence apps are accessible at the ip:port addresses (ports 8081 and 8091). After a while, don't know exactly how much, it starts working again.
The setup is the following:
Jira server.xml contains two connectors:
            <Connector port="8080"
               maxThreads="150"
               minSpareThreads="25"
               connectionTimeout="20000"
               enableLookups="false"
               maxHttpHeaderSize="8192"
               protocol="HTTP/1.1"
               useBodyEncodingForURI="true"
               redirectPort="8443"
               acceptCount="100"
               disableUploadTimeout="true"
               proxyName="jira.team.domain.com"
               proxyPort="80"/>
            <Connector port="8081"
               maxThreads="150"
               minSpareThreads="25"
               connectionTimeout="20000"
               enableLookups="false"
               maxHttpHeaderSize="8192"
               protocol="HTTP/1.1"
               useBodyEncodingForURI="true"
               redirectPort="8443"
               acceptCount="100"
               disableUploadTimeout="true"/>
Confluence server.xml also has 2 connectors:
<Connector port="8091" connectionTimeout="20000" redirectPort="8443"
            maxThreads="200" minSpareThreads="10"
            enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
            protocol="org.apache.coyote.http11.Http11NioProtocol" />
<Connector port="8090" connectionTimeout="20000" redirectPort="8443"
            maxThreads="200" minSpareThreads="10"
            enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
            protocol="org.apache.coyote.http11.Http11NioProtocol"
            proxyName="confluence.team.domain.com" proxyPort="80" />
and the /etc/apache2/sites-enabled/000-default.conf looks like this:
<VirtualHost *:*>
  ServerName localhost
  # DocumentRoot /var/www/html
  <Proxy *>
    Require all granted
  </Proxy>
  # ProxyRequests Off
  ProxyPreserveHost On
  ProxyPass / http://jira.team.domain.com:8080/
  ProxyPassReverse / http://jira.team.domain.com:8080/
</VirtualHost>
<VirtualHost *:*>
  ServerName confluence.team.domain.com
  DocumentRoot /var/www/html
  <Proxy *>
    Require all granted
  </Proxy>
  ProxyRequests Off
  ProxyPreserveHost On
  ProxyPass / http://confluence.team.domain.com:8090/
  ProxyPassReverse / http://confluence.team.domain.com:8090/
</VirtualHost>
Could anyone help me solve this issue?