Linux   « USB memory stick | HOME | Apache + user directory (http://addresss.com/~user/) »

 ■ Apache + SSL (HTTPS)

(Cent OS 4.4)

To encrypt connections with SSL (HTTPS)

Install
# yum -y install mod_ssl


Setup
# cd /usr/share/ssl/certs
Change to the certs directory

# make server.key

Make a key (Server Key)
System prompts you to enter password twice.

# openssl rsa -in server.key -out server.key
Delete password from the key. Otherwise system prompts you to input password everytime when you reboot httpd.

# make server.csr

Make a key (Public Key)
No need to setup password here.

# openssl x509 -in server.csr -out server.pem -req -signkey server.key -days 365
Create Certification (server.pem)

# chmod 400 server.*
Do not show those to other


SSL setup on httpd
# vi /etc/httpd/conf.d/ssl.conf

# General setup for the virtual host, inherited from global configuration
#DocumentRoot "/var/www/html"

DocumentRoot "/var/www/html"

SSLCertificateFile /usr/share/ssl/certs/server.pem
SSLCertificateKeyFile /usr/share/ssl/certs/server.key (Indicate key file)


And then , restart httpd.

If necessary, open the port 443 on the Router.

投稿者 tomopugh : 2007年03月13日 11:20

Comment

Please comment !




Save the info?


  (Please don't click on "post" twice. It takes time a bit to change to the next screen!!)