If a customer would like to remove port 8080 or 8090 (or 7990 etc) from the URL, you will need to install mod_proxy.
Assumptions
- You are running Linux (RedHat, CentOS etc)
Step by Step Guide
-
1yum install httpd
-
1nano /etc/httpd/conf.d/jira.conf (or confluence.conf)
Use one of the following snippets:
JIRA:
-
123456789101112131415<VirtualHost *>ServerName jira.example.comProxyRequests Off<Proxy *>Order deny,allowAllow from all</Proxy>ProxyPass / http://localhost:8080/ProxyPassReverse / http://localhost:8080/<Location />Order allow,denyAllow from all</Location></VirtualHost>
Confluence:
-
123456789101112131415161718<VirtualHost *>ServerName confluence.example.comProxyRequests Off<Proxy *>Order deny,allowAllow from all</Proxy>ProxyPass / http://localhost:8090/ProxyPassReverse / http://localhost:8090/<Location />Order allow,denyAllow from all</Location></VirtualHost></li><li><pre class="prettyprint">nano /etc/httpd/conf/httpd.conf
AFTER:
-
12# Load config files in the "/etc/httpd/conf.d" directory, if any.IncludeOptional conf.d/*.conf
ADD:
-
12LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.soLoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
-
1systemctl start httpd
-
1chkconfig httpd on
-
1/usr/sbin/setsebool -P httpd_can_network_connect 1
-
1systemctl stop jira
-
1cd /opt/atlassian/jira/conf (or confluence/conf)
-
1cp server.xml server.xml.bak
-
1nano server.xml
Add the proxyName and proxyPort at the bottom
-
12345678910<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"12proxyName="jira.example.com"proxyPort="80" />
-
12345678910<Connector port="8090"maxThreads="150"minSpareThreads="25"connectionTimeout="20000"enableLookups="false"maxHttpHeaderSize="8192"protocol="HTTP/1.1"useBodyEncodingForURI="true"redirectPort="8443"acceptCount="100"disableUploadTimeout="true"
-
12proxyName="confluence.example.com"proxyPort="80" />
Save (ctrl + X … Y … Enter)
-
1systemctl restart httpd
-
1systemctl restart jira