This guide requires access to your v-hosts on your root!
If you want to set up a ssl-certificate you have to change and add some things to your v-hosts-file.
1. You have to change the typical first line:
to:
Now your apache know, that you're using ssl.
2. The apache has to know, where the ssl-files are.
Add this lines:
Your final v-host-file could look like this:
Now every http request will be changed to a https-request
If you want to set up a ssl-certificate you have to change and add some things to your v-hosts-file.
1. You have to change the typical first line:
Code:
<VirtualHost *:80>
to:
Code:
<VirtualHost *:443>
Now your apache know, that you're using ssl.
2. The apache has to know, where the ssl-files are.
Add this lines:
Code:
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/ssl.crt #Path to your .crt file
SSLCertificateKeyFile /etc/apache2/ssl/ssl.key #Path to your .key file
ServerSignature On
Your final v-host-file could look like this:
Code:
<VirtualHost *:443>
ServerAdmin postmaster@yoursite.com
ServerName yoursite.com
ServerAlias www.yoursite.com
DocumentRoot /home/public_html/www/yoursite
<Directory /home/public_html/www/yoursite>
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/yoursite_error.log
LogLevel warn
CustomLog /var/log/apache2/yoursite_access.log combined
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/ssl.crt
SSLCertificateKeyFile /etc/apache2/ssl/ssl.key
ServerSignature On
</VirtualHost>
Now every http request will be changed to a https-request