« My iPod doesn't work with my old PC's USB card | Main | Simplified Chinese font is much better in Opera 8.02 »
July 19, 2005
HOWTO enable apache2 with ssl on Solaris 10
1) Apache2 SSL certificate creation
NOTE: This is for internal testing only! Production systems should go through the correct procedures to obtain a CA authorized certificate.
a) openssl req -new -text -out server.req
- Fill in options appropriate for your use
- NOTE: Common Name is name of your server
b) openssl rsa -in privkey.pem -out server.key
- PassPhrase is phrase entered above
c) rm privkey.pem
d) openssl req -x509 -in server.req -text -key server.key -out server.crt
e) modify /etc/apache2/ssl.conf
- comment SSLRandomSeed startup builtin
- comment SSLRandomSeed connect builtin
- uncomment SSLRandomSeed startup file:/dev/random 512
- uncomment SSLRandomSeed connect file:/dev/random 512
- change <VirtualHost _default_:443> to <VirtualHost *:443>
f)
create directory /etc/apache2/ssl.crt
create directory /etc/apache2/ssl.key
copy server.key /etc/apache2/ssl.key/
copy server.crt /etc/apache2/ssl.crt/
2) SMF Service Modification
a) svccfg -s apache2 setprop httpd/ssl = boolean: 'true'
b) check the status
- svcs apache2
STATE STIME FMRI
disabled 13:35:04 svc:/network/http:apache2
c) start the service
- svcadm enable apache2
d) check the status
- svcs apache2
STATE STIME FMRI
online 13:42:30 svc:/network/http:apache2
3) Test your site with Mozilla or Firefox.
Thanks to Mike Dotson's help.
Technorati Tags: apache, solaris, ssl
Posted by ginn at July 19, 2005 3:20 PM
Trackback Pings
TrackBack URL for this entry:
http://www.chenqi.org/mt/mt-tb.cgi/26
Comments
2 years later, I revisited this blog to get it work again for my updated Solaris 10.
I recovered my *.conf file, and tried svcadm enable apache2.
No luck.
I tried svcadm disable apache2, and still found httpd running on my system.
Killed them.
And ran /lib/svc/method/http-apache2 start, it worked.
Now the problem is how to let svcadm to manager it.
svccfg -s apache2 setprop httpd/ssl = boolean: 'true'
doesn't work for me.
So I did:
svccfg -s http:apache2 setprop httpd/ssl=true
svcadm refresh http:apache2
svcprop -p httpd/ssl svc:network/http:apache2
Now I can use svcadm enable apache2 to start it.
More information about ssl on Solaris 10 can be found at
http://meljr.com/~meljr/ssl_cert_Sol10.html
Posted by: Ginn Chen at March 2, 2007 12:58 PM