• C:\Program Files\Apache Group\Apache2\conf
  • This alias is for the examples used in Week 6 Lab Alias /Week6Lab "D:\Lecture\InternetPublishing\CourseMaterial\Week6\Lab\SampleFiles"
  • Publishing and Requesting XHTML documents from Alias Directory




    Download 2.06 Mb.
    bet6/6
    Sana22.12.2019
    Hajmi2.06 Mb.
    1   2   3   4   5   6

    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

    OR


    • 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.



    Configuring Virtual Directory


    • 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




    • Launch a browser, and type the following URL:


    http://localhost/Week6Lab/test.html




    Download 2.06 Mb.
    1   2   3   4   5   6




    Download 2.06 Mb.

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    Publishing and Requesting XHTML documents from Alias Directory

    Download 2.06 Mb.