2-7: Setting up an Ubuntu Linux Web Server – Reference Summary

In this chapter we have gone through all the knowledge required to set up a Linux web server from scratch, and explained in detail, step my step, the procedures and command involved. We have also provided the first rudiments of Linux system administration and filesystem management.

Despite the lengthy explanations in the previous sections, once you have some familiarity with Linux, and have an Ubuntu desktop linux installed on a machine, setting up a web server is actually a matter of a few minutes.

In this section we summarize, for quick reference, with no further explanations (please refer to previous sections), all the commands required to install the server software and configure the machine so that each user have access to an individual web folder with a dedicated address.

”andrea@ubuntu:~$ sudo apt-get update”

Installing OpenSSH Server

”andrea@ubuntu:~$ sudo apt-get install openssh-server”

Installing tasksel

”andrea@ubuntu:~$ sudo apt-get install tasksel”

Installing LAMP server

”andrea@ubuntu:~$ sudo apt-get install lamp-server”

Activate module userdir:

”andrea@ubuntu:~$ sudo a2enmod userdir”

Edit main Apache configuration file

”andrea@ubuntu:~$ sudo nano -w /etc/apache2/apache2.conf”

so as to add line:

”UserDir public_html”

Comment out a directive in the apache php configuration file:

”andrea@ubuntu:~$sudo nano -w /etc/apache2/mods-available/php5.conf”

Comment out (add # at the beginning of the line) all the lines from:

”<ifModule mod_userdir.c>”

to

”</ifModule>”

Restart apache:

”andrea@ubuntu:~$ sudo service apache2 restart”

or

”andrea@ubuntu:~$ /etc/init.d/apache2 restart”

Done! If you have comments or issues or success reports (most welcome!), please share by posting below.

Chapter Sections

Leave a Reply

Your email address will not be published. Required fields are marked *