Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Tomcat config is incorrect behind Apache

Marie Endres
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 30, 2018

Hi,

I configured Confluence to run behind Apache 2.4 SSL, following the corresponding guides I found in the Atlassian documentation, everything seems to work fine, except I find this error anytime I log in to the interface:

Tomcat config is incorrect

The Tomcat server.xml has an incorrect configuration:

scheme should be 'https'
proxyName should be 'subdomain.domain.corp'
proxyPort should be '443'

 

Also, my server still responds on port 8090.

 

This is the relevant config in server.xml, other connector sections are commented as recommended in the very same file. As you can see, the fields values displayed 

 

<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"
scheme="https" secure="true" proxyName="subdomain.domain.corp=" proxyPort="443"/>

 

and this is my config in httpd.conf

 

<VirtualHost *:443>
ServerName subdomain.domain.corp
ProxyRequests Off

<Proxy *>
Require all granted
</Proxy>

ProxyVia Off
SSLProxyEngine On
ProxyRequests Off
ProxyPreserveHost On
RemoteIPHeader X-Forwarded-For

ProxyPass / http://domain.corp:8090/
ProxyPassReverse / http://domain.corp:8090/

SSLEngine On
SSLCertificateFile /etc/ssl/certs/hostname.pem
SSLCertificateKeyFile /etc/ssl/certs/private.key
</VirtualHost>

 

Any help is really appreciated, i wouldn't like to disable the Base URL plugin as suggested here, before making sure nothing is badly configured. 

https://confluence.atlassian.com/confkb/can-t-check-base-url-warning-in-confluence-6-6-or-later-939718433.html

Also, why the server is still answering in port 8090? shall I block this port in Iptables?

 

Thanks

2 answers

0 votes
seffparker
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 20, 2020

Managed to fix after using a different service port for JAVA in server.xml. 

  1. Modify port="8090" to port="8092" in server.xml
  2. Modify the port to 8092 in Apache conf for both ProxyPass and ProxyPassReverse
  3. Restart Confluence
  4. Restart Aapche
0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 31, 2018

My usual mistake is doing all the right things in the server.xml, but forgetting to uncomment the connector I have modified, so it carries on using the old one.

Your connector looks right to me, so I'm guessing it's not being read by Tomcat, rather than it being wrong!

Marie Endres
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 31, 2018

Thanks! Actually I don't think it doesn't read it, I reverted all changes and stopped Apache and now it is working OK again ... seems a configuration issue but I ignore what can be wrong.

Cloud Architect
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 29, 2019

oops! I still suffer from the same error:

Tomcat config is incorrect

The Tomcat server.xml has an incorrect configuration:

scheme should be 'https'
proxyName should be 'subdomain.domain.com'
proxyPort should be '443'

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 1, 2019

As before, you'll need to correct the settings in the server.xml file.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events