Asked By
akiltec
0 points
N/A
Posted on - 09/29/2011
I had configured a basic Apache web server and it is functioning without any errors. Now I need to make that server ready for SSL support. I need to know what are the changes that I have to make in the httpd.conf file and any other configuration files to make the server ready for SSL.
Answered By
stephney
0 points
N/A
#83615
How to enable SSL support for apache web server
Hi,
Follow the steps mentioned here:
Â
1. Create some sample web content, which will be served up via TLS/SSL:
Â
-
umask 022 mkdir /www echo "<html><head><title>Test</title></head><body> Test works.</body></html>" > /www/index.html chown -R root:sys /www
Â
2. Replace the default Apache configuration file (normally found in /usr/local/apache2/conf/httpd.conf) with the new one, using the following content (optimized with respect to security and performance).
Â
Please check the attachment
Â
Note: Readers should change some of the values in the above configuration file such as the name of the web server, the administrator's e-mail address, etc.
Â
3. Prepare the directory structure for web server's private keys, certificates and certification revocation lists (CRLs):
Â
-
umask 022 mkdir /usr/local/apache2/conf/ssl.key mkdir /usr/local/apache2/conf/ssl.crt mkdir /usr/local/apache2/conf/ssl.crl
Â
4. Create a self-signed server certificate (it should be used only for test purposes — your real certificate should come from a valid CA such as Verisign):
Â
-
openssl req -new -x509 -days 30 Â -keyout /usr/local/apache2/conf/ssl.key/server.key -out /usr/local/apache2/conf/ssl.crt/server.crt -subj '/CN=Test-Only Certificate'