Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Server Log Install Https
- apt-get -y install apache2
- Generate A certificate
- mkdir /etc/apache2/ssl
- cd /etc/apache2/ssl
- openssl req -x509 -days 365 -newkey rsa:1024 -keyout hostkey.key -nodes -out hostcert.pem
- --------------
- Generating a 1024 bit RSA private key
- ...........++++++
- ......++++++
- writing new private key to '/etc/apache2/ssl/hostcert.pem'
- -----
- 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]:West Java
- Locality Name (eg, city) []:Bandung
- Organization Name (eg, company) [Internet Widgits Pty Ltd]:Hade Network
- Organizational Unit Name (eg, section) []:Hade Warnet
- Common Name (eg, YOUR name) []:Wandi Budiana
- Email Address []:[email protected]
- root@debian:~#
- ------------------------
- chmod 700 *
- nano /etc/apache2/sites-available/default-ssl
- //update the following:
- SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
- SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
- with :
- SSLCertificateFile /etc/apache2/ssl/hostcert.pem
- SSLCertificateKeyFile /etc/apache2/ssl/hostkey.key
- ln -s /etc/apache2/sites-available/default-ssl /etc/apache2/sites-enabled/000-default-ssl
- a2enmod ssl
- /etc/init.d/apache2 restart or /etc/init.d/apache2/force-reload
Add Comment
Please, Sign In to add comment