Installing a web server under Debian and Ubuntu is as simple as
It is also installed as part of the LAMP (Linux/Apache/MySQL/PHP)
$ wajig install lamp-server^
You will now have a default web page at http://localhost/.
The actual page being displayed there comes from
/var/www/index.html. You can begin creating your own web site
For a secure web server, using SSL to encrypt all communications from
a browser to the server (recognised with the https: prefix) you will
need to enable the ssl module in apache2 and configure it:
$ wajig install apache2 openssl
$ sudo mkdir /etc/apache2/ssl
$ sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf \
$ sudo mv /etc/apache2/ssl/certificat.pem \
$ sudo a2enmod ssl
$ cd /etc/apache2/sites-available
$ sudo cp default ssl
Edit the new ssl:
Edit default to add *:80.
Make sure /etc/apache2/ports.conf contains:
For apache1 there were two approaches available: One is to use
apache with the libapache-mod-ssl module and
the other is to install the apache-ssl which installs a
separate apache server to listen to port 443 (instead of
80). There are advantages either way but using apache-ssl
is straightforward and cleanly keeps the two servers separate
(configuration files are in /etc/apache and
/etc/apache-ssl and log files in /var/log/apache and
Copyright © 1995-2019 Togaware Pty Ltd
Support further development through the purchase of the PDF version of the book.
Brought to you by Togaware and the author of open
source software including Rattle and wajig.
Also the author of Data Mining with Rattle and Essentials
of Data Science.