Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
Might be as simple as the order in your configuration file, it looks at first glance that SSL is not yet configured when you define the virtual host. What happens when you move the Include conf/extra/httpd-ssl.conf to the top of the snippet above? –  HBruijn Dec 3 '13 at 7:05
    
Tried ..but no luck . Actually https is working fine but issue here is that when I implemented https , load balancing is not working which was working fine without SSL –  Zama Ques Dec 3 '13 at 7:11
    
Could you post the 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. –  HBruijn Dec 3 '13 at 11:39
    
The issue was resolved after I moved the load balancing configuration from httpd.conf to httpd-ssl.conf –  Zama Ques Dec 18 '13 at 7:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.