Pre-installation notes The guide bellow is based on the previous guide Hardening guide for Apache 2.0 on Solaris 10 platform
SSL implementation phase
Login to the server using Root account.
Mount Solaris 10 DVD, and move to the packages folder:
cd /cdrom/sol_10_1008_x86/Solaris_10/ProductRun the command bellow to install OpenSSL packages:
pkgadd -d . SUNWopensslr SUNWopenssl-commands SUNWopenssl-include SUNWopenssl-librariesCreate folder for the SSL certificate files:
mkdir -p /etc/apache2/ssl.crtCreate folder for the SSL private key:
mkdir -p /etc/apache2/ssl.keyRun the command bellow to generate a key pair:
/usr/sfw/bin/openssl genrsa -des3 -out /etc/apache2/ssl.key/server.key 1024Specify a complex pass phrase for the private key (and document it)Change the permissions on the private key file:
chmod 600 /etc/apache2/ssl.key/server.keyRun the command bellow to generate the CSR:
/usr/sfw/bin/openssl req -new -newkey rsa:1024 -nodes -keyout /etc/apache2/ssl.key/server.key -out /tmp/apache.csrNote: The command above should be written as one line.Send the file /tmp/apache.csr to a Certificate Authority server.
As soon as you receive the signed public key from the CA server via email, copy all lines starting with “Begin” and ending with “End” (include those two lines), into notepad, and save the file as “server.crt”
Copy the file “server.crt” using SCP into /etc/apache2/ssl.crt/
Follow the link on the email from the CA server, to create the Root CA chain, and save it as “ca-bundle.crt” (Note: The file must be PEM (base64) encoded).
Copy the file “ca-bundle.crt” using SCP into /etc/apache2/ssl.crt/
Edit using VI the file /etc/apache2/ssl.conf and change the following strings: From:
SSLSessionCache dbm:/var/run/apache2/ssl_scacheTo:SSLSessionCache dbm:/var/ apache2/ssl_scacheFrom:
SSLMutex file:/var/run/apache2/ssl_mutexTo:SSLMutex file:/var/apache2/ssl_mutexFrom:
ServerName 127.0.0.1:443To:ServerName Server_FQDN:443From:
DocumentRoot "/var/apache2/htdocs"To:DocumentRoot "/www"From:
#SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crtTo:SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crtFrom:
SSLCipherSuite ALL:!ADH:!EXPORT56:-AES256-SHA:-DHE-RSA-AES256-SHA:-DHE-DSS-AES256-SHA:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULLTo:SSLCipherSuite ALL:-ADH:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXPRemove the section bellow:
<Directory "/var/apache2/cgi-bin">Stopping Apache from command line:
/usr/apache2/bin/apachectl stopStarting Apache from command line:
/usr/apache2/bin/apachectl startssl
