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 FoundationApache
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 FoundationApache
Type 'set OPENSSL_CONF=C:Program FilesApache Software FoundationApache
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 FoundationApache
Ssl Setup Apache Windows Weblogic
8.Open the httpd-ssl.conf file in 'C:Program FilesApache Software FoundationApache
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)
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
Choose Citation Style
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?
aartistaartist2 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 ThiventI would suggest, https://globalsign.ssllabs.com/ if your website is publically available.