Hello everyone,
So i have apache proxy SSL over jira and everything is working fine, i added confluence to the same server and now im trying to do the same thing, to have it behind apache SSL. This is my apache conf file that im using:
<VirtualHost *:443>
ServerAdmin webmaster@localhost
DocumentRoot /opt/atlassian/jira
ServerName my-servername.com
ProxyPreserveHost on
ProxyPass / http://mydomain:8080/
ProxyPassReverse / http://mydomain:8080/
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/jira.crt
SSLCertificateKeyFile /etc/apache2/ssl/jira.key
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Now what should i add/change in this file to have confluence also behind it. FYI JIRA is at port 8080 and confluence is at port 8090. confluence home folder is /opt/atlassian/confluence.
Any help or guidance is greatly appreciated, thanks in advance!
Cheers
hello Ghaith.
this is an example of one of our configuration it might help.
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
LoadModule proxy_wstunnel_module /usr/lib/apache2/modules/mod_proxy_wstunnel.so
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
...
Include conf/jira-virtualhost.conf
Include conf/confluence-virtualhost.conf
jira-virtualhost.conf
<VirtualHost *:443>
ServerName jira.<DOMAIN>.com
ProxyRequests Off
ProxyVia Off
<Proxy *>
Require all granted
</Proxy>
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
# SSLEngine On
# SSLCertificateFile /atlassian/ssl-domain/cert.pem
# SSLCertificateKeyFile /atlassian/ssl-domain/certprivkey.pem
# SSLCertificateChainFile /atlassian/ssl-domain/chain.pem
SSLEngine On
SSLCertificateFile /atlassian/ssl-domain/SSLCertificateFile.crt
SSLCertificateKeyFile /atlassian/ssl-domain/SSLCertificateKeyFile.key
SSLCertificateChainFile /atlassian/ssl-domain/SSLCertificateChainFile.crt
</VirtualHost>
<VirtualHost *:80>
ServerName jira.<DOMAIN>.com
Redirect Permanent / https://jira.<DOMAIN>.com
</VirtualHost>
confluence-virtualhost.conf
<VirtualHost *:443>
ServerName confluence.<DOMAIN>.com
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Require all granted
</Proxy>
ProxyPass /synchrony http://localhost:8091/synchrony
<Location /synchrony>
Require all granted
RewriteEngine on
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]
RewriteRule .* ws://localhost:8091%{REQUEST_URI} [P]
</Location>
ProxyPass / http://localhost:8090/
ProxyPassReverse / http://localhost:8090/
SSLEngine On
SSLCertificateFile /atlassian/ssl-domain/SSLCertificateFile.crt
SSLCertificateKeyFile /atlassian/ssl-domain/SSLCertificateKeyFile.key
SSLCertificateChainFile /atlassian/ssl-domain/SSLCertificateChainFile.crt
<Location />
Require all granted
</Location>
<Location /confluence>
Require all granted
</Location>
</VirtualHost>
<VirtualHost *:80>
ServerName confluence.<DOMAIN>.com
Redirect Permanent / https://confluence.<DOMAIN>.com/
Redirect Permanent /synchrony https://confluence.<DOMAIN>.com/synchrony
</VirtualHost>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
quick question just to make sure. i should also change the base URL for both applications right?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sorry forgot to share that>
this is the examples of the server.xml
Jira:
<Service name="Catalina">
<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.<DOMAIN>.com"
proxyPort="443"
secure="true"
scheme="https"
bindOnInit="false"/>
...
<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">
<Context path="/" docBase="${catalina.home}/atlassian-jira" reloadable="false" useHttpOnly="true">
Confluence
<Server port="8000" shutdown="SHUTDOWN" debug="0">
<Service name="Tomcat-Standalone">
<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"
proxyName="confluence.<DOMAIN>.com"
proxyPort="443"
secure="true"
scheme="https"/>
...
<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">
<!-- Logger is deprecated in Tomcat 5.5. Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties -->
...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if you mean the base URL in Jira, yes.
the base URL should be the one users use to access your app. if it is now the https URL, then that should be your base URLs. all your statics will be referenced using that URL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Ghaith Haddad my pleasure ;)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Gonchik Tsymzhitov
Thank you for the reply but i've been to these links before but they only show how to setup apache proxy for one service not 2 which is what im trying to do. Or am i not missing something there?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, you need to set first the context path for one of service.
https://confluence.atlassian.com/confkb/how-to-change-the-confluence-context-path-707985922.html
Then set in the proxy rule like
ProxyPreserveHost on
ProxyPass /wiki http://mydomain:8090/
ProxyPassReverse /wiki http://mydomain:8090/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ok after i set the context path for confluence should i add
ProxyPreserveHost on
ProxyPass /wiki http://mydomain:8090/
ProxyPassReverse /wiki http://mydomain:8090/
to the same apache proxy file that i have? so in a sense i would have 2 of these one for jira and one for confluence?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.