Tuesday, February 11, 2014

Enable SSL on WAMP server and error encountered

In order to get my WAMP server to support SSL, below are the steps to configure

1. Open httpd.conf that located at [WAMP_HOME]\bin\apache\Apache2.4.4\conf

Uncomment line as described below

LoadModule ssl_module modules/mod_ssl.so
Include conf/extra/httpd-ssl.conf
2. Open php.ini that located at [WAMP_HOME]\bin\php\php5.4.12

Uncomment line as described below

extension=php_openssl.dll
3. Open httpd-ssl.conf that located at [WAMP_HOME]\bin\apache\Apache2.4.4\conf\extra, edit the parameter as described below

<VirtualHost _default_:443>
#   General setup for the virtual host
DocumentRoot "c:/wamp/www"
ServerName localhost:443
ServerAdmin admin@example.com
ErrorLog "[WAMP_HOME]/logs/apache_ssl_error.log"
TransferLog "[WAMP_HOME]/logs/access_ssl.log"
</VirtualHost>
SSLCertificateFile "[CERTIFICATE_FILE]"
SSLCertificateKeyFile "[CERTIFICATE_KEY_FILE]"
SSLCertificateChainFile "[CERTIFICATE_CHAIN_FILE]"
4. Restart WAMP services, encountered the WAMP service icon is displayed as brown color and unable to start.


5. Open DOS command and change to directory [WAMP_HOME]\bin\apache\Apache2.4.4\bin. Type command to cross check the Apache configuration file

 httpd -t
Encountered error as described below is displayed

AH00526: Syntax error on line 76 of C:/wamp/bin/apache/Apache2.4.4/conf/extra/ht
tpd-ssl.conf:
SSLSessionCache: 'shmcb' session cache not supported (known names: ). Maybe you
need to load the appropriate socache module (mod_socache_shmcb?).
Open httpd.conf, uncomment the line as described below

LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
Type command to cross check the Apache configuration file

 httpd -t
Encountered error as described below is displayed

(OS 3)The system cannot find the path specified.  : AH02297: Cannot access direc
tory 'C:/Apache24/logs/' for log file 'c:/Apache24/logs/ssl_request.log' defined
 at C:/wamp/bin/apache/Apache2.4.4/conf/extra/httpd-ssl.conf:250
AH00014: Configuration check failed
Open httpd-ssl.conf, change the custom log directory to point to correct directory.

CustomLog "[WAMP_HOME]/logs/ssl_request.log" \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
Restart WAMP services, you should be able to start your Apache Web Server. Your SSL has been enabled.

3 comments:

Bhuwan Chand said...

still the Apache starting pls help.

Thanks

Bhuwan Chand said...

Still the Apache starting pls help.

Thanks

Unknown said...

Thank you. It helped me :) (wamp3)