Apache SSL Certificates
Disclaimer: Securing your web server and obtaining valid SSL/TLS certificates are the sole responsibility of your organisation’s IT administrator. Ellab Monitoring Solutions Ltd does not provide, manage, or assume responsibility for SSL certificates or custom server SSL configurations. This guide is provided strictly as a general checklist and reference to assist your team in enabling HTTPS on Apache.
For production environments, we strongly recommend obtaining a certificate from a trusted Certificate Authority (CA) rather than using a self-signed certificate.
Before You Start
Gather the following details for the server where Apache is installed. In the examples below, we use placeholder values:- Server Computer Name:
emsserver - Server IPv4 Address:
172.19.95.217
Overview Checklist
Step 1: Obtain or Generate SSL Certificate Files
If you have already obtained a certificate and private key from your IT department or a trusted CA, rename them toserver.crt and server.key (or adjust the file names in Step 2 accordingly), copy them into your Apache conf directory, and skip to Step 2.
For testing purposes only, you can generate a self-signed certificate using OpenSSL:
- Open Command Prompt as Administrator.
-
Navigate to the Apache
bindirectory:cd "C:\Program Files (x86)\Ellab Monitoring Solutions Ltd\Apache24\bin" -
Run the following command to generate the key and certificate directly into the
conffolder (replaceemsserverand172.19.95.217with your server’s details):openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ..\conf\server.key -out ..\conf\server.crt -config ..\conf\openssl.cnf -subj "/CN=emsserver" -addext "subjectAltName=DNS:emsserver,IP:172.19.95.217"
Step 2: Configure Apache for SSL
-
Confirm that both
server.crtandserver.keyare located in:
C:\Program Files (x86)\Ellab Monitoring Solutions Ltd\Apache24\conf -
Open
.\conf\httpd.confin a text editor (run as Administrator) and uncomment (remove the#at the beginning of) the following four lines:LoadModule socache_shmcb_module modules/mod_socache_shmcb.so LoadModule ssl_module modules/mod_ssl.so LoadModule rewrite_module modules/mod_rewrite.so Include conf/extra/httpd-ssl.conf - Save and close
httpd.conf. -
Open
.\conf\extra\httpd-ssl.confand verify or update the following directives so they match your server name and certificate paths:Listen 443 ServerName emsserver:443 SSLCertificateFile "${SRVROOT}/conf/server.crt" SSLCertificateKeyFile "${SRVROOT}/conf/server.key" - Save and close
httpd-ssl.conf.
Step 3: Restart the Apache Service
- Open the Windows Services app (
services.msc). - Locate the Apache service, right-click it, and select Restart (or Start if it is stopped).
If the service fails to start: Open Command Prompt, navigate toC:\Program Files (x86)\Ellab Monitoring Solutions Ltd\Apache24\bin, and runhttpd -t. This command tests your configuration files and highlights any syntax errors or invalid file paths.
Step 4: Test the Connection
- Open a web browser and navigate to
https://emsserver(replacingemsserverwith your server’s hostname). - If configured correctly, the browser will load the default “It works!” page (or your web application) over HTTPS.
Troubleshooting
- Connection times out from another computer: Ensure Windows Defender Firewall (or your network firewall) allows inbound TCP traffic on Port 443.
-
Browser displays a “Your connection is not private” warning (Self-Signed Certificates): If you generated a self-signed certificate for testing in Step 1, client machines will not trust it until it is imported into the Windows certificate store:
- Copy
server.crtfromC:\Program Files (x86)\Ellab Monitoring Solutions Ltd\Apache24\confto the client machine (or perform this locally on the server). - Right-click
server.crtand select Install Certificate. - Select Local Machine and click Next.
- Select Place all certificates in the following store and click Browse...
- Select Trusted Root Certification Authorities and click OK.
- Click Next, then Finish.
- Copy