Related Articles
We'll even show you how to configure Windows Firewall to allow traffic to your new web site. In our tutorial, we show you how to install Apache on to a Windows server. Install and Configure Apache on Windows Liquid Web.
- 1 Create an SSL Certificate in Apache
- 2 Uninstall Apache Server
- 3 Open a Certificate in Cygwin
- 4 Create a New Web Server Certificate
One of the most commonly used Web servers, the Apache Hypertext Transport Protocol Server was first released to the public in 1995. The Apache Project has evolved over the years, but it remains devoted to remaining free -- great news for any business looking to establish a Web server. With a little time and the right commands, your business can host its own website and set up OpenSSL for secure communications using the Secure Sockets Layer technology for encrypted transactions over the Web.
Problems with openssl.cnf
1.Browse to your Apache conf directory, 'C:Program FilesApache Software FoundationApacheconf' and check the openssl.cnf file. Substitute the correct version number for '.' Windows may have reassociated the .cnf extension with SpeedDial or another program.
3.Click on the 'File Types' tab and browse down the list to the .cnf association.
4.Click on 'Change...' to associate the file with Notepad or another text editor.
Keys and Configuration
1.Open a command prompt. Press the Windows key and 'R' simultaneously to bring up the 'Run' dialog box. Type 'cmd' in the text box and press 'Enter' to launch the Windows command prompt.
2.Type 'cd C:Program FilesApache Software FoundationApachebin' at the command prompt, substituting the version number for ',' to browse to the bin directory.
3.Type 'set OPENSSL_CONF=C:Program FilesApache Software FoundationApacheconfopenssl.cnf' to define the location of the openssl.cnf file. You may need to adjust the command to match it to your individual server installation.
4.Type 'openssl req -config 'C:Program FilesApache Software FoundationApache2.2confopenssl.cnf' -new -out mysite.csr -keyout mysite.pem' and follow the prompts to create your certificate. The PEM pass phrase is your private key password; write it down and keep it in a secure location. Note that the command creates keys in the terminal's current working directory, which should be /bin.
5.Type 'openssl rsa -in mysite.pem -out mysite.key' to create an unprotected key for the Apache server.
6.Type 'openssl x509 -in mysite.csr -out mysite.cert -req -signkey mysite.key -days 365' to generate the x509 certificate.
7.Check through your httpd.conf file, by default in 'C:Program FilesApache Software FoundationApacheconf' and remove the hash (#) tags on the following lines: LoadModule ssl_module modules/mod_ssl.so Include conf/extra/httpd-ssl.conf
8.Open the httpd-ssl.conf file in 'C:Program FilesApache Software FoundationApacheconfextra' and update these settings to fit your install:
VirtualHost default:443 ServerAdmin DocumentRoot ServerName ErrorLog CustomLog SSLCertificateFile SSLCertificateKeyFile
9.Restart the Apache server. You can test your configuration by navigating to 'https://localhost/' in your Web browser.
Tip
- There are multiple server setups for Apache based on your httpd.conf and httpd-ssl.conf files; you may want to take the time to read the files and structure the server to your business and security needs.
References (2)
Resources (2)
About the Author
Ben Richard began writing in 1996. He is compiling an anthology of poetry as well as a nonfiction book. Richard studied philosophy and English at Texas A&M University. Richard writes on technology and specializes in web design.
Photo Credits
- Hemera Technologies/AbleStock.com/Getty Images
Choose Citation Style
Richard, Ben. 'How to Configure Apache SSL for Windows.' Small Business - Chron.com, http://smallbusiness.chron.com/configure-apache-ssl-windows-46530.html. Accessed 21 January 2020.
Richard, Ben. (n.d.). How to Configure Apache SSL for Windows. Small Business - Chron.com. Retrieved from http://smallbusiness.chron.com/configure-apache-ssl-windows-46530.html
Richard, Ben. 'How to Configure Apache SSL for Windows' accessed January 21, 2020. http://smallbusiness.chron.com/configure-apache-ssl-windows-46530.html
Note: Depending on which text editor you're pasting into, you might have to add the italics to the site name.