How to configure https for an apache redirecting to tomcat via mod_proxy connector (ajp)
<p>I have an apache server on an linux system (on amazon aws), running with https. I also have an tomcat on it. I want to use the apache as a front door to the tomcat. I enabled the mod_proxy module for the apache and the redirection to the tomcat works fine and looks like this:</p>

<pre><code>&lt;VirtualHost *:80&gt;
   ServerName my.domain.com

   #Log
   ErrorLog /var/log/ajp.error.log
   CustomLog /var/log/ajp.log combined

   #AJP configuration
   &lt;Proxy *&gt;
       Order deny,allow
       Deny from all
       Allow from all
   &lt;/Proxy&gt;

   ProxyRequests Off

   ProxyPass / ajp://localhost:8009/
   ProxyPassReverse / ajp://localhost:8009/

 &lt;/VirtualHost&gt;
</code></pre>

<p>I added this lines at the bottom of my file httpd.conf in /etc/httpd/conf.d folder. </p>

<p>But if I add another VirtualHost in the httpd.conf file to redirect to https, the redirection to https works but the apache Test page will be shown, not the tomcat page. If I remove this redirection VirtualHost the apache tomcat page will be shown. I also enabled the mod_rewrite module. The https stuff I configured in ssl.conf (/etc/httpd/conf.d/ssl.conf) and it works fine. There I setup the ssl certificates and if the client make an request with an known https certificate the server will answer the request. Else not.</p>

<p>The VirtualHost for the https redirection I added to the httpd.conf looks like this:</p>

<pre><code>    &lt;VirtualHost *:80&gt;
         ServerName my.domain.com
         RewriteEngine on
         ReWriteCond %{SERVER_PORT} !^443$
         RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]
    &lt;/VirtualHost&gt;
</code></pre>

<p>Can you please help me? What I am doing wrong here? Should I make changes in the /etc/httpd/conf.d/ssl.conf file? I am very </p>