4.2 Publishing and Requesting XHTML documents from Alias Directory httpd.conf Configuration File To achieve this, we need to configure the Apache Web Server by editing the httpd.conf file. The file contains all the information that the Apache Web Server needs to run and serve Web documents.
To edit this file, you can choose either one of this method:
Go to C:\Program Files\Apache Group\Apache2\conf and click on httpd
Click Start -> Programs -> Apache HTTP Server [version number] -> Configure Apache Server -> Edit the Apache httpd.conf Configuration File
The httpd.conf file opens in Notepad. httpd.conf is a large text file with all of Apache Web server’s configuration information. In this file, any line that starts with # is a comment that explains the various configuration options.
Scroll down the file until you have reached the section titled Aliases (You can also press ALT+F and type Aliases, to quickly find the Aliases section in httpd.conf). This section begins with the following text:
Aliases: Add here as many aliases as you need (with no limit). The format is…..
Add the following line below the comment:
#This alias is for the examples used in Week 6 Lab
Alias /Week6Lab "D:\Lecture\InternetPublishing\CourseMaterial\Week6\Lab\SampleFiles"
This creates an alias called Week6Lab that points to the physical directory D:\Lecture\InternetPublishing\CourseMaterial\Week6\Lab\SampleFiles.
Note that we must use forward slash (/), not backward slash (\).
Restart Apache Web Server so that the changes made to httpd.conf will take effect