How to enable SSL support for apache web server

Asked By 0 points N/A Posted on -
qa-featured

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.

SHARE
Answered By 0 points N/A #83615

How to enable SSL support for apache web server

qa-featured

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'

Login/Register to Answer

Related Questions