Problems with Apache SSL as a reverse proxy

Alles, was den Apache betrifft, kann hier besprochen werden.

Problems with Apache SSL as a reverse proxy

Postby Ingrimmsch » 23. March 2018 08:39

i'm completly new to Apache.

I'm using Apache as a reverse proxy in front of a Tomcat. My Tomcat runs a Java Application.

If i use Tomcat without Apache everything is working fine.

If i use Apache in front of Tomcat i only see parts of my application and get an error that the site is using unsecure scripts.

- Apache version: 2.4
- operating system: Windows Sever 2012 R2
- Tomcat Version 8.5

I can't see any relevant informations in my logs.

Relevant configurations:

Apache httpd.conf:

Code: Select all
LoadModule authn_socache_module modules/
LoadModule proxy_module modules/
LoadModule proxy_http_module modules/
LoadModule rewrite_module modules/
LoadModule socache_shmcb_module modules/
LoadModule ssl_module modules/

Include conf/extra/httpd-ssl.conf

Apache httpd-ssl.conf:

Code: Select all
Listen 443

<VirtualHost _default_:443>

ServerName internal.server.loc
ServerAlias internal.server.loc
ErrorLog "D:/Apache24/logs/error.log"
TransferLog "D:/Apache24/logs/access.log"
ProxyRequests off
ProxyPreserveHost On
ProxyPass         /    http://localhost:8080/ Keepalive=On
ProxyPassReverse   /    http://localhost:8080/
Timeout 2400
ProxyTimeout 2400
ProxyBadHeader Ignore
RewriteRule ^/?(.*) https://internal.server.loc/$1 [R,L]
SSLEngine on
SSLCompression off   
SSLCertificateFile "D:\Apache24\conf\internal.server.loc.cert"
SSLCertificateKeyFile "D:\Apache24\conf\internal.server.loc.key"

Tomcat server.xml:

Code: Select all
   <Connector executor="tomcatThreadPool" maxHttpHeaderSize="65536" URIEncoding="UTF-8"
               port="8080" proxyName="internal.server.loc" proxyPort="80" protocol="HTTP/1.1"
               connectionTimeout="20000" />

If i use the following Tomcat connector without apache everything is working fine:

Code: Select all
   <Connector port="443" maxHttpHeaderSize="65536" URIEncoding="UTF-8" protocol="org.apache.coyote.http11.Http11NioProtocol"
               maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS"
               keystoreFile="D:\Apache Software Foundation\Tomcat 8.5\conf\internal.server.loc.pfx"
          keystorePass="Password" />   

Thanks for any help i can get.
Posts: 2
Joined: 23. March 2018 08:35
XAMPP version: 7
Operating System: Windows 2012 R2

Return to Apache

Who is online

Users browsing this forum: No registered users and 6 guests