We are using apache mod-proxy on top of tomcat to achive load balancing. It is working fine , now we are planning to move to https from httpd . For that my configuration looks as follows
NameVirtualHost 10.x.x.3:443
<VirtualHost 10.x.x.3:443>
ServerName 10.x.x.x.3
ProxyRequests off
ProxyPreserveHost On
<Proxy *>
Order Deny,Allow
Allow from all
</Proxy>
ProxyPass /balancer-manager !
ProxyPass / balancer://mycluster/ stickysession=JSESSIONID nofailover=On
ProxyPassReverse / balancer://mycluster/ stickysession=JSESSIONID
Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/"
<Proxy balancer://mycluster>
Header set Cache-Control no-cache
Header set Pragma no-cache
BalancerMember http://192.168.2.182:8080 route=node1
BalancerMember http://192.168.2.183:8080 route=node2
ProxySet lbmethod=byrequests
ProxySet stickysession=ROUTEID
</Proxy>
<Location /balancer-manager>
SetHandler balancer-manager
Order deny,allow
Allow from all
</Location>
</VirtualHost>
Include conf/extra/httpd-ssl.conf
I have added the certificate and key location in httpd-ssl.conf . Plz find below contents from httpd-ssl.conf
Listen 43
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
<VirtualHost _default_:443>
ErrorLog "/usr/local/apache2/logs/error_log"
TransferLog "/usr/local/apache2/logs/access_log"
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLCertificateFile "/usr/local/apache2/conf/server.crt"
SSLCertificateKeyFile "/usr/local/apache2/conf/server.key"
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "/usr/local/apache2/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-5]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
CustomLog "/usr/local/apache2/logs/ssl_request_log" \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
https is working fine , but redirecting to tomcat servers is not happening. I am seeing the default apache "It works" test page .
Kindly guide am I missing anything in apache configuration
Include conf/extra/httpd-ssl.conf
to the top of the snippet above?conf/extra/httpd-ssl.conf
. because if I look at my own ssl.conf include the majority of SSL setup is done within a virtualhost context and wouldn't neccesarily work in a second virtualhost.