Ssl Setup Apache Windows Web

Configuring Apache with SSL The following instructions assume that you wish to run both a secure server (on port 443) and a regular server (on port 80). First, you need to configure the server to listen on both ports.

Related Articles

  • 1 Create an SSL Certificate in Apache
  • 2 Uninstall Apache Server
  • 3 Open a Certificate in Cygwin
  • 4 Delete an SSL Certificate on Barracuda

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

Ssl Setup Apache Windows Weblogic

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

Ssl Setup Apache Windows Webmin

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)

Install

About the Author

Apache Windows Vista

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

Install Ssl Certificate Apache Windows

  • Hemera Technologies/AbleStock.com/Getty Images
Cite this Article
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 26 August 2019.
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
Windows
Richard, Ben. 'How to Configure Apache SSL for Windows' accessed August 26, 2019. 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.
Active3 years, 2 months ago

My Apache server works fine without -DSSL, but does not start with SSL. This happened after I re-install the certificate because of expiration. (it used to work before) I would love to have some tool to check up if my newer setup of ssl key and certificate is correct or not. That would include permission, ownership etc..Or is there any way to figure out why it doesn't work with SSL?

aartistaartist
2,0642 gold badges24 silver badges27 bronze badges

2 Answers

You can check your configuration files for syntax errors without starting the server by using apachectl configtest or the -t command line option.

That said, I don't think that Apache fails silently. There must be something in Apache's logs. Can you check this and provide the trace?

PS: You should add details on your environment such as your OS (Windows, GNU/Linux, Unix, etc), the Apache version, etc. This could help.

Pascal ThiventPascal Thivent
497k119 gold badges973 silver badges1073 bronze badges

I would suggest, https://globalsign.ssllabs.com/ if your website is publically available.

hpavchpavc

Not the answer you're looking for? Browse other questions tagged sslapache or ask your own question.