2012年6月22日 星期五

Apache https enable steps

Reference: http://linux.vbird.org/linux_server/0360apache.php#www_ssl

1. Create Certificate file
cd /etc/pki/tls/certs
vi Makefile
# change 365 to 3650, extend expire date to 10 years
make private.key
# input your password
mv private.key private.key.raw
openssl rsa -in private.key.raw -out private.key
rm -f private.key.raw
chmod 400 private.key
make certificate.crt SERIAL=2012062201

Country Name (2 letter code) [XX]:TW
State or Province Name (full name) []:Taiwan
Locality Name (eg, city) [Default City]:Hsinchu
Organization Name (eg, company) [Default Company Ltd]:Your_company
Organizational Unit Name (eg, section) []:Your_dept
Common Name (eg, your name or your server's hostname) []:www.your_company.com
Email Address []:admin@your_company.com


2. modify Apache ssl.conf
vi /etc/httpd/conf.d/ssl.conf
# SSLCertificateFile /etc/pki/tls/certs/certificate.crt
# SSLCertificateKeyFile /etc/pki/tls/certs/private.key
/etc/init.d/httpd restart

沒有留言:

張貼留言