sudo apt-get install apache2
sudo a2enmod ssl
sudo service apache2 restart
sudo mkdir /etc/apache2/ssl
openssl req -x509 -nodes -days 730 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:ID
State or Province Name (full name) [Some-State]:Jawa Barat
Locality Name (eg, city) []:BDG
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Apocalypsix.Inc
Organizational Unit Name (eg, section) []:Dept Dreams
Common Name (e.g. server FQDN or YOUR name) []:stark.com
Email Address []:apocalypsix@gmail.com
sudo nano /etc/apache2/sites-available/default-ssl
ServerAdmin webmaster@localhost
ServerName www.imtelkoms.ac.id
DocumentRoot /var/www/www2
# Tambahkan baris ini di file default-ssl anda
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/apache.crt
SSLCertificateKeyFile /etc/apache2/ssl/apache.key
# SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
# SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
Sudo a2ensite default-ssl
Sudo service apache2 restart
Hand made - not verified |
sumber : tutorialubuntuindonesia.blogspot.co.id |