Changes

Configuring an Ubuntu Linux Based Web Server

1,462 bytes added, 15:13, 2 July 2007
Configuring the Apache Web Server for Your Domain
== Configuring the Apache Web Server for Your Domain ==
 
The next step in setting up your web server is to configure it for your domain name. This is performed in the /etc/apache2 directory. To configure the web server open a terminal windows and change directory to /etc/apache2. In this directory you will find two sub-directories, sites-available and sites-enabled. Change directory into sites-enabled. In this directory you will find a ''default'' file which may be used as a template for your own site.
 
Copy the ''default'' file to a new file with name which matches your doamin name. For example:
 
<pre>
sudo cp default myexample.com
</pre>
 
Edit your myexample.com file using your favorite editor using the sudo command to ensure you have write permission to the file. The top of the file will appear as follows:
 
<pre>
NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@localhost
 
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
#RedirectMatch ^/$ /apache2-default/
</Directory>
 
</pre>
 
The ''ServerAdmin'' directive defines