Example SSL vhost file & Enable SSL in Apache

Sample SSL enabled apache VHOSTS files

Link to help setup / install SSL on Ubuntu 11 / 12
http://extrimity.in/content/enable-ssl-or-https-ubuntu-1104-apache-2
NameVirtualHost *:443
NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot /var/www/
        ErrorLog /var/log/apache2/error.log
        CustomLog /var/log/apache2/access.log combined
</VirtualHost>

<VirtualHost *:443>

DocumentRoot /var/www/yourwebsitename.com
        ErrorLog /var/log/apache2/error.log
        CustomLog /var/log/apache2/access.log combined

        SSLEngine on
    SSLCertificateFile /etc/apache2/ssl/apache.pem
ServerName yourwebsitename.com
</VirtualHost>
Print Friendly, PDF & Email

More Like This


Categories


Linux Web Hosting
  • Post a comment