Docsity

Apache Server - Linux - Lecture Slides, Slides of Linux skills

Partial preview of the text

Download Apache Server - Linux - Lecture Slides and more Slides Linux skills in PDF only on Docsity!

APACHE WEB SERVER

Introduction and Installation

of Apache Server

Note: Images courtesy of apache.org

Installing Apache

Installing Apache From a CD-ROM

  • If your CD-ROM has Apache and you want to use RPM to install the package, issue this command - rpm – i apache_1_3_4.rpm

(substitute the full name of the Apache package)

Installing Apache… (con’t)

  • Uncomment all the Modules in the configuration file except
    • cern_meta_module
    • msql_auth_module
    • dld_module
  • Choose either db_auth_module or dbm_auth_module; they should not be used together

Installing Apache… (con’t)

  • Create the configuration file for Linux by issuing the command
    • Configure
  • Compile Apache by issuing the make command
    • The most common error message encountered concerns the socket.h library, most likely because TCP/IP is not installed

Setting Up the Website

Setting Up the Website

  • Create the home directory for the website, we will use /usr/www/ganesan
  • Create 3 subdirectories under the site directory
    • conf
    • htdocs
    • logs

Setting Up the Website (con’t)

  • Rename the 3 files you just copied to drop the “-dist” portion of the name
  • Edit the httpd.conf file to specify
    • the port number on which your web server responds
    • the user running the httpd daemon, etc…
  • Specify the server name
    • ServerName ganesan.com

Setting Up the Website (con’t)

  • Add a line that specifies the root directory for your website - DocumentRoot /usr/www/ganesan/htdocs
  • Edit the srm.conf file to set up the web home directory and any special internal command usage
  • Edit the access.conf file to set a basic set of access permissions

Setting Up the Website (con’t)

  • Test the web server by starting a browser and specify the URL http://127.0.0.1/
  • If the system is working properly, you will see a screen with a list of files in the htdocs directory

Server Configuration

Server Configuration (con’t)

  • Set the Group directive to either the group ID (GID) or the group name assigned to all web users
  • Modify the ServerAdmin directive to include the e- mail address of the administrator
  • Set the ServerRoot directive to the absolute path to the directory where all Apache resource and configuration files are stored - /usr/apache/conf or /etc/httpd

Server Configuration (con’t)

  • Set the ServerName directive to the fully qualified domain name of your server