Itis 3100 Apache Lab




Download 36,92 Kb.
bet7/10
Sana15.03.2017
Hajmi36,92 Kb.
#53
1   2   3   4   5   6   7   8   9   10

Step3: Configure Apache


Now it is time to reconfigure the default configuration of Apache to serve your files. The configuration file is called default and is in the /etc/apache2/sites-available directory.

  • Open the configuration file for editing.
    Note: it will be easiest to use vi from a root terminal since you will be changing files that your user id will not have permission to change.
    From a root terminal:
    vi /etc/apache2/sites-available/default

  • Change the default document root
    Look for the line “DocumentRoot /var/www/”. Change the directory name to the new server root base directory /apachelab/. The line should now read: “DocumentRoot /apachelab/”.

  • Allow root indexes (show directory structure):
    Find the first Options FollowSymLinks
    to:
    Options Indexes FollowSymLinks
    Note: there may be slight variations on the Options line, just ensure the Indexes word is added if need be.

  • Edit the second - change the /var/www/ to /apachelab/ITIS2110
    - If there is RedirectMatch directive put a comment mark (#) in front of it

Restart the Apache server:

There are two methods:


service apache2 restart

-or-


/etc/init.d/apache2 restart

You will use Iceweasel again to browse the localhost. You should now be able to browse the new web pages. Ensure all the links work. Document your effort. Try browsing localhost with no file name. You should see the directory structure on the returned document. Try it also with localhost/ITIS2110 as the URL. You should see another directory structure for that directory.

**Again, document your effort.


Download 36,92 Kb.
1   2   3   4   5   6   7   8   9   10




Download 36,92 Kb.