0% found this document useful (0 votes)
30 views

Setting Https Apache Win

This document provides instructions for setting up HTTPS on Apache web server (Windows 64-bit). It involves generating a private key and certificate, moving the files to the Apache configuration folder, uncommenting SSL modules in the Apache configuration file, and configuring the SSL port and files in the HTTPS configuration file. Once completed, the validity of the configuration can be checked and HTTPS should work on localhost.

Uploaded by

DjamalOsman
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Setting Https Apache Win

This document provides instructions for setting up HTTPS on Apache web server (Windows 64-bit). It involves generating a private key and certificate, moving the files to the Apache configuration folder, uncommenting SSL modules in the Apache configuration file, and configuring the SSL port and files in the HTTPS configuration file. Once completed, the validity of the configuration can be checked and HTTPS should work on localhost.

Uploaded by

DjamalOsman
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

How to setup https on apache (windows 64bit)

1. Open a command prompt (WindowsKey + R > cmd > click OK) and enter the following commands.
cd c:\wamp64\bin\apache\apache2.4.27\bin
openssl genrsa -aes256 -out private.key 2048
openssl rsa -in private.key -out private.key
openssl req -new -x509 -nodes -sha1 -key private.key -out certificate.crt -days 36500 -config
c:\wamp64\bin\apache\apache2.4.27\conf\openssl.cnf

Note: You can pretty much answer the questions any way you want though real answers are best. The one
question that really matters here is the FQDN. It should be: localhost.

2. Move the private.key and certificate.crt files from c:\wamp64\bin\apache\apache2.4.27\bin to the


c:\wamp64\bin\apache\apache2.4.27\conf\key\ folder. If the key folder doesn't already exist, create it.

3. Using a text editor like Notepad, open c:\wamp64\bin\apache\apache2.4.27\conf\httpd.conf and un-


comment following 3 lines:
LoadModule ssl_module modules/mod_ssl.so
Include conf/extra/httpd-ssl.conf
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so

4. Using a text editor like Notepad, open c:\wamp64\bin\apache\apache2.4.27\conf\extra\httpd-ssl.conf


and apply the following changes:
Below the line: <VirtualHost _default_:443>, check the following parameters to ensure they are config-
ured correctly and not commented.
-------------------------------------
DocumentRoot "c:/wamp64/www"
ServerName localhost:443
ServerAdmin [email protected]
SSLSessionCache "shmcb:c:/wamp64/bin/apache/apache2.4.27/logs/ssl_scache(512000)"
ErrorLog "c:/wamp64/bin/apache/apache2.4.27/logs/error.log"
TransferLog "c:/wamp64/bin/apache/apache2.4.27/logs/access.log"
SSLCertificateFile "c:/wamp64/bin/apache/apache2.4.27/conf/key/certificate.crt"
SSLCertificateKeyFile "c:/wamp64/bin/apache/apache2.4.27/conf/key/private.key"
-------------------------------------
5. Save the file and close it.

6. You are done. To check the validity of file, at the command prompt, enter:

c:\wamp64\bin\apache\apache2.4.27\bin\httpd -t and then use your web browse to go to


https://localhost/

From this point on, you should be able to start, stop and restart Wamp Server and SSL-HTTPS will continue to
work.

You might also like