Posted by: jasonk2600 | November 14, 2009

Quickie HowTo – Apache with SSL

Installation

Install OpenSSL from the FreeBSD ports collection.

# cd /usr/ports/security/openssl
# make config
# make install clean
# rehash

Next install Apache v2.2.x from the ports collection. NOTE: When configuring the port be sure that the SSL option is checked.

# echo "WITH_SSL_MODULES=YES" >> /etc/make.conf
# cd /usr/ports/www/apache22
# make config
# make install clean
# rehash

 

Configuration

 

Edit /usr/local/etc/apache22/httpd.conf and uncomment the following line:

Include etc/apache22/extra/httpd-ssl.conf

Next, create a self-signed certificate for SSL with OpenSSL.

 

# cd /usr/local/etc/apache22
# openssl genrsa -out server.key 1024
# openssl req -new -key server.key -out server.csr
# openssl x509 -req -days 365 -in server.csr \
  -signkey server.key -out server.crt

 

Testing

Finally, set Apache to start at boot time and start it for the first time.

 

# echo "apache_enable=YES" >> /etc/rc.conf
# /usr/local/etc/rc.d/apache22 start

 

Open up your favorite Web browser and try to visit your newly configured Apache Web server with HTTPS://.

 [EoF]

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: