0

Can anyone tell me how I can configure SSL in Apache.

I generated a dummy certificate for testing, but with my virtual host file config is not working.

Can anyone see what's wrong?

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>
1
  • Why is the server name and port different to the virtual host?
    – Quentin
    Jul 4, 2011 at 15:40

1 Answer 1

0

I currently use this for my SVN server, it all depends on how you set up the certs though.

I followed Godaddy's directions here

NameVirtualHost *:443
<virtualhost *:443>
ServerName svn.example.com
ServerAdmin webmaster@localhost
SSLEngine On
SSLCertificateFile /etc/apache2/certs/example.com.crt
SSLCertificateKeyFile /etc/apache2/certs/example.com.key
SSLCertificateChainFile /etc/apache2/certs/gd_bundle.crt

DocumentRoot /var/www/svn/
<Directory "/var/www/svn/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
</Directory>

ErrorLog /var/log/apache2/ssl-error.log
CustomLog /var/log/apache2/ssl-access.log combined
ServerSignature On
</virtualhost>

Try adding double quotes around anything with spaces, i am not great at windows based vhost, but it seems this could be an issue.

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

try

SSLCertificateFile "C:/Program Files (x86)/ApacheSoftwareFoundation/conf/ssl.crt/server.crt" 
SSLCertificateKeyFile "C:/Program Files (x86)/ApacheSoftwareFoundation/conf/ssl.key/server.key"
1
  • hi, thanks for replay. I have edit my code and provide my virtual host file please tell me is there anything wronge with my code? Jul 4, 2011 at 15:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .