logo
Apache Lounge
Webmasters

 


About

Forum Index Downloads Search Register Log in  RSS Apache Lounge
 


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.




Problems with Apache SSL as a reverse proxy

 
Post new topic   Reply to topic    Apache Forum Index -> Apache



View previous topic :: View next topic  
Author Message
Ingrimmsch



Joined: 21 Mar 2018
Posts: 1
Location: Germany

PostPosted: Wed 21 Mar '18 11:41    Post subject: Problems with Apache SSL as a reverse proxy Reply with quote

Hi,
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:
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:
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:
   <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:
   <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.
Back to top


Post new topic   Reply to topic    Apache Forum Index -> Apache
Page 1 of 1