0

can anyone tell me how I can implement SSL in apache. I mean the code that have to be written in virtual host file for using https. Actually I had generate dummy certificate for testing, but with my virtual host file coding it's not working. So, please give me a peace of code in virtual host file which will work for https. My Virtual host file.

   <IfDefine SSL>
   <VirtualHost mydomainname.com:443>
   ServerName www.mydmainnamw.com:8080
   DocumentRoot "C:/.../My Company/My Sites/johnbokma.com/site/web"
   #CustomLog logs/lc.johnbokma.com.access.log combined
   #ErrorLog logs/lc.johnbokma.com.error.log

   SSLEngine on
   SSLCertificateFile C:/Program Files (x86)/ApacheSoftwareFoundation/conf/ssl.crt/server.crt 
   SSLCertificateKeyFile C:/Program Files (x86)/ApacheSoftwareFoundation/conf/ssl.key/server.key

   SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
   CustomLog logs/ssl_request_log \
   "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

   <Proxy balancer://Default>
        BalancerMember http://server1:8080/page-to-be-displayed retry=5
   </Proxy>
   ProxyPass /balancer-manager !
   ProxyPass / balancer://Default/
   </VirtualHost>
   <IfDefine SSL>

Is there any wronge in my virtual host file? Please replay me as soon as possible.

Thank you.

Lokesh Paunikar
  • 123
  • 1
  • 4

1 Answers1

0

Place double quotes around the path entries in your SSLCertificateFile and SSLCertificateKeyFile directives (because there are spaces in the path names) or move the files into directories that don't have any spaces in them. Moving them might be the better option--I don't know how apache is going to parse the parentheses in your path name.

Also, make sure mod_ssl is loaded.

mahnsc
  • 1,796
  • 13
  • 11