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/mod_authn_socache.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
LoadModule ssl_module modules/mod_ssl.so
Include conf/extra/httpd-ssl.conf
Apache httpd-ssl.conf:
- Code: Select all
Listen 443
<VirtualHost _default_:443>
ServerAdmin admin@root.de
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"
</VirtualHost>
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.