วันอังคารที่ 30 กันยายน พ.ศ. 2551

ubuntu ssl apache

1. make a self-signed SSL certificate
using openssl

$ apt-get install openssl
$ openssl req -new -x509 -days 365 -nodes -out server.crt \ -keyout server.key


or
$ cd /etc/ssl/certs
$ sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf apache.pem

2. turn on SSL

$ a2enmod ssl


4.change the file in



add

NameVIrtualHost web05:443
..
SSLEngine On
SSLCertificateFile /etc/apache2/server.crt
SSLCertificateKeyFile /etc/apache2/server.key


NameVirtualHost web05:80
NameVIrtualHost web05:443

<virtualhost:443>
ServerAdmin webmaster@localhost

DocumentRoot /var/www/web05
SSLEngine On
SSLCertificateFile /etc/apache2/server.crt
SSLCertificateKeyFile /etc/apache2/server.key
RailsBaseURI /ror

</virtualhost>


ref : debianclub

ไม่มีความคิดเห็น:

LinkWithin

Related Posts Plugin for WordPress, Blogger...