openssl-0.9.6a.tar.gz
apache_1.3.19.tar.gz
apache_1.3.19+ssl_1.42.tar.gz
noc.ws.afnog.org (from above)
and drop them in /u/src/
example-simple-ssl-httpd.conf
tar -zxvf openssl-0.9.6a.tar.gz
cd openssl-0.9.6a/
README
and
INSTALL
files.
./config
make
make test
make install
Uncompressing Apache and adding the SSL patch
tar -zxvf apache_1.3.19.tar.gz
apache_1.3.19+ssl_1.42.tar.gz apache_1.3.19/.
cd apache_1.3.19
tar -zxvf apache_1.3.19+ssl_1.42.tar.gz
take a look at README.SSL
./FixPatch
Configuring and building Apache
-
./configure --prefix=/usr/local/apache --enable-suexec --suexec-caller=nobody
-
make
-
make install
This is the hairy bit(making a certificate)
-
cd /usr/local/ssl/certs
- Create the key and request
/usr/local/ssl/bin/openssl
req -new > new.cert.csr
[Prepare to create a passphrase]
- Remove the passphrase from the key
openssl rsa
-in privkey.pem -out new.cert.key
[You'll need the passphrase from above]
- Convert request into signed cert
openssl x509
-in new.cert.csr -out new.cert.cert -req -signkey new.cert.key -days 365
- So what do you have as a result of this? An ssl certificate file
called
/usr/local/ssl/certs/new.cert.cert
and
a certificate keyfile called /usr/local/ssl/certs/new.cert.key
Configuring Apache
- Here's an example server config
-
using ssl means you're running two virtual servers
- one on port
80
(the regular server)
- one on port
443
(the ssl server)
- You have more directories to keep track of because of your keys
- the key that was generated is valid for only one hostname
- So, a key per virtual host is a good idea if you're doing virtual hosts
with ssl servers as well
- Unsigned keys are fine for things like running your webmail services
through ssl, for ecommerce type applications having a key signed by a reliable
CA (certificate authority) is considered normal.
- CA's include Verisign (USA), Thawte (South Africa) and others
- http.conf example a generic
config for ssl
The last couple steps
-
cp /u/src/example-simple-ssl-httpd.conf /usr/local/apache/conf/
- Lets edit
/usr/local/apache/conf/example-simple-ssl-httpd.conf
- There are a couple of values we'll have to change in order to
localize it to the local host
Ok, from the config file we know we need
to create a directory in order to store the ssl cache file mkdir
/usr/local/apache/cache
and create the file itself
touch /usr/local/apache/cache/file
- So now lets test our config file for errors
/usr/local/apache/bin/httpsd
-t -f /usr/local/apache/conf/example-simple-ssl-httpd.conf
- If all is well... Run it.
/usr/local/apache/bin/httpsd
-f /usr/local/apache/conf/example-simple-ssl-httpd.conf
- now to connect to your webserver on ports
80
and 443
DONE
References
Last modified:
Sun May 6 09:40:54 PDT 2001