Reposted from: Network Security blog original link: blog reposted from: Network Security Blog
Original: http://www.safe121.com/post-40.html
Enable ssl first:a2enmod ssl
Then create a certificate
Create a folder for storing certificates:mkdir /home/cert
Then drop the certificate to the created directory:
openssl req -x509 -newkey rsa:1024 -keyout /home/cert/x73.pem -out /home/cert/x73.pem -nodes -days 9999999999999
Then edit the default configuration file of apache:vim /etc/apache2/sites-available/default
(I am used to using nano. vi is so powerful)
Open Nima's editor and write in the last line
ServerSignature On
SSLEngine On
SSLCertificateFile SSL path (/home/cert/x73.pem)
ServerAdmin x@x73.cc
DocumentRoot "/website Path"
Php_admin_value open_basedir "/website path:/tmp"
ServerName domain name
ServerAlias domain name
CustomLog/website path/log-ssl combined
Enter/etc/init. d/apache2 restart
Restart the apache service. Alternatively, you can: service apache2 restart.
You can use https to access