Copy the default Apache configuration file to a new file named "default-ssl-site" with the following command:
cp /etc/apache2/sites-available/default /etc/apache2/sites-available/default-ssl-site
Edit the default-ssl-site file and ensure that the following lines are included:
NameVirtualHost *.443
ServerAdmin youremailaddress@yourprovider
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/certs/apache.crt
SSLCertificateKeyFile /etc/apache2/apache-ssl/apache.pem
Issue the following commands to enable your default-ssl-site and restart the Apache2 server:
a2ensite default-ssl-site
/etc/init.d/apache2 restart
Your default-ssl-site should now listen on port 443 (SSL). You can test by opening a browser and keying "localhost/default-ssl-site" in the address bar and pressing "Enter."
Комментариев нет:
Отправить комментарий