SSL Part 1: ssl.conf
SSL Part 1: Home | Apache Upgrade | mod_ssl Install | httpd.conf | ssl.conf | Key & Certificate | |
mod_ssl Configuration ssl.conf |
On the previous page I covered the httpd configuration file this page looks at the ssl configuration file. I recommended you keep the two files separate this not only eases faultfinding but also has an additional benefit when experimenting.
|
|
|
ssl.conf and Vhosts
This configuration file is relatively self-contained change the domain name from unicenterdemo12.dyndns.org to unicenter.gotdns.org (use your real domain name) and the root folder if you have renamed that.
Open file ssl.conf located in folder *\Uniform Server\udrive\usr\local\apache2\conf the only change that needs to be made is in the Vhost section highlighted in bold.
NEW |
---|
######################### Global SSL ###############################
Listen 443 #== Pass Phrase Dialog:(`builtin' is a internal terminal dialog) #== Inter-Process Session Cache: ##SSLSessionCache none SSLSessionCache shmcb:logs/ssl_scache(512000) SSLSessionCacheTimeout 300 #== SSL engine uses internally for inter-process synchronization. #== Pseudo Random Number Generator (PRNG): SSLRandomSeed startup builtin ########### SSL Virtual Host ############################ NameVirtualHost *:443 <VirtualHost _default_:443> ServerName unicenter.gotdns.org ErrorLog logs/error_ssl.log #== SSL Engine Switch: SSLEngine on #== SSL Cipher Suite: #== Server Certificate: #== Server Private Key: # This enables optimized SSL connection renegotiation handling when SSL #== SSLOptions +FakeBasicAuth +ExportCertData +CompatEnvVars +StrictRequire <Directory "/home/admin/www/cgi-bin/"> #== Basic authentication <Directory "/www/site3"> #== Most problems of broken clients are related to the HTTP #== Per-Server Logging: </VirtualHost> |
Basic Authentication
For completeness my template installed basic authentication, if your requirement is to encrypt form data only and want the secure server public, disable basic authentication by commenting out these lines as shown:
ssl.conf - basic authentication |
---|
#== Basic authentication #<Directory "/www/site3"> |
Note: In this case there is no need to change the password file
Name and Password
If you wish to retain basic authentication change the name and password in file .htpasswd located in folder *\Uniform Server\udrive\htpasswd\modsslpass it currently contains the following:
File name: .htpasswd | Comments |
---|---|
name:password |
Choose a suitable name and password remember to separate them with a colon |
Test
You now have a fully configured server that uses your domain name. A quick test run the following (substitute your domain name for unicenter.gotdns.org):
Test | Result |
---|---|
1) Start the servers using Server_Start.bat | Normal server operation with apanel displayed. |
2) Type http://unicenter.gotdns.org/ | Displays Site 1 home page |
3) Type http://news.unicenter.gotdns.org/ | Displays Site 2 home page |
4) Type http://cars.unicenter.gotdns.org/ | Displays unsecured default page |
5) Type https://unicenter.gotdns.org/ |
a) Pop-up displays Website Certified by an Unknown Authority - Click Accept temporarily this session |
Summary
The certificate installed was purely for testing to fully secure your server you must create a new key and certificate this final step is described on the next page. Note this will also remove the alert in test 5b.
Ric |