Securing Apache 2 using SSL

openssl genrsa -out www.myee.web.id.key 1024

openssl req -new -key www.myee.web.id.key -x509 -out www.myee.web.id.crt

openssl req -new -key www.myee.web.id.key -out www.myee.web.id.csrNameVirtualHost *:80
NameVirtualHost *:443


ServerAdmin webmaster@www.myee.web.id.com
DocumentRoot /var/www/html/www.myee.web.id
ServerName www.myee.web.id
ServerAlias myee.web.id


ServerAdmin webmaster@www.myee.web.id.com
DocumentRoot /var/www/html/www.myee.web.id
ServerName www.myee.web.id
SSLEngine on
SSLCertificateFile /etc/httpd/ssl.crt/www.myee.web.id.crt
SSLCertificateKeyFile /etc/httpd/ssl.key/www.myee.web.id.key


SSLRequireSSL


ServerAdmin webmaster@www.myee.web.id
DocumentRoot /var/www/html/www.myee.web.id
ServerName www.myee.web.id
RedirectMatch permanent (/.*) https://www.myee.web.id$1

Leave a Reply

Your email address will not be published.