index Previous Next



To setup a web server install the apache2 and follow these steps.
Create these directories:
mkdir /home/www/example.net/htdocs
mkdir /home/www/example.net/cgi-bin
mkdir /home/www/example.homenet.org/htdocs
mkdir /home/www/example.homenet.org/cgi-bin
Copy the html documents to the htdocs of every server and set permissions to:
chmod -R 0755 www
Now to configure virtual hosts create a file for each web server in the /etc/apache2/sites-available
<VirtualHost *:80>
ServerAdmin example@example.net
DocumentRoot /home/www/example.net/htdocs
ServerName example.net
ServerAlias www.example.net
<Directory />
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/home/www/example.net/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
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
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
Download the example.net and example.homenet.org
