HTTPS Notes
Installation Packages
-----------------------------
1- install package: ssl-cert
Commands of Interest
-------------------------------
1- make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/site1.horgoth.com.crt
: make an ssl certificate
2- a2ensite site.file.name : enable a site file
3- a2enmod module name : enable an available module
Files and Directories
---------------------
1- /etc/apache2/ssl : Directory for ssl certificates
/etc/apache2/mods-available/: Directory of available modules
/etc/apache2/mods-enabled/ : Directory of modules that are in use
/etc/apache2/sites-available/: Directory of available virtual hosts
/etc/apache2/sites-enabled/ : Directory of virtual hosts that are used
2- /var/log/apache2 : log file directory
/var/log/apache2/error.log : start/stop/error messages
/var/log/apache2/access.log : log of HTTP requests
Specific Configuration Tasks
-----------------------------------------------------------------------
To set up an https web site
-----------------------------------------------------------------------
0- sudo bash
1- update apache configuration
a- edit /etc/apache2/ports.conf. Add line with "Listen 443"
b- a2enmod ssl
2- Create the certificate
apt-get install ssl-cert
mkdir /etc/apache2/ssl
make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/site1.horgoth.com.crt
^^^^^^^^^^^^^^^^^
your site name here
3- cd /etc/apache2/sites-available
4a- edit default,
change "NameVirtualHost *" to "NameVirtualHost *:80"
change "<VirtualHost *>" to "<VirtualHost *:80>"
4b- edit each site.file
change "<VirtualHost *>" to "<VirtualHost *:80>"
5- edit a new.site.file for the https site.
This is the site1.horgoth.com https site file
========================================================================
<VirtualHost 144.38.212.56:443>
ServerName site1.horgoth.com
ServerAlias www.site1.horgoth.com
ServerAdmin webmaster@horgoth.com
DocumentRoot /var/www/secure-site1.horgoth.com
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/secure-site1.horgoth.com/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/site1.horgoth.com.crt
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
</VirtualHost>
========================================================================
6- Enable the new site with
a2ensite site1.horgoth.com.443
7- Make directory for site
mkdir /var/www/secure-site1.horgoth.com
8- /etc/init.d/apache2 restart
9- Set up content in DocumentRoot
10- Browse site with
https://site1.horgoth.com/document
Copyright 2007,
by the Contributing Authors.
Cite/attribute Resource.
HTTPS Notes. (2007, November 27). Retrieved August 21, 2008, from Dixie State College of Utah Web site: http://pilot.educommons.usu.edu/dixiestate/computer-and-information-technology/it-3100-systems-design-and-adminsitration-i/https-notes.
This work is licensed under a
Creative Commons License.
















