ch4-ConfiguringAppache.ppt - Configuring Apache •...

  • No School
  • AA 1
  • 23

This preview shows page 1 - 5 out of 23 pages.

Configuring Apache Downloading, compiling and installing apache is straightforward and even someone easy The real effort is to properly configure apache Configuring apache consists of specifying directives in the configuration file(s) using containers to override directives for specific directories, files or URLs writing proper rewrite and redirection rules compiling and utilizing important modules making proper use of apache environment variables properly configuring the Linux environment around apache In this chapter, we start with the basic configurations and explore the main configuration file, httpd.conf in chapter 5, we explore more advanced configurations and later in the semester, we also explore modules, rules, etc
Image of page 1

Subscribe to view the full document.

httpd.conf Starting with apache 2.0, most of the configuration information is stored in this one file this file and other configuration information are placed in the sysconfdir directory (if you specified this during the ./configure Linux command) otherwise, it will be found in your conf directory This file contains three types of information documentation (comments, which always follow the # symbol) directives – settings for various apache parameters such as DocumentRoot or CustomLog – these directives are system- wide – that is, they impact all of Apache containers – directives that will take effect on specific entities such as directories, files or URLs The httpd.conf file can be very large you can reduce its size by dividing the file into several files and use Include statements to attach other files to the main httpd.conf file
Image of page 2
Basic Directives ServerRoot – this specifies location in the Linux file system where the httpd.conf file will be found other files that are referenced through Include or LoadModule statements will also be found in this directory DocumentRoot – this specifies the location in the Linux file system where the html files and other web documents will be stored never make ServerRoot and DocumentRoot be the same directory as this leads to security holes people could potentially access and alter configuration files to fulfill a request, the server will take the path from the URL and append it to DocumentRoot if DocumentRoot is /var/www/html and the URL is then the file accessed is /var/www/html/dir1/dir2/file1.html NOTE: DocumentRoot’s path should not end with a / to make sure this works correctly!
Image of page 3

Subscribe to view the full document.

More Directives ServerName – this is the IP alias of the server in order to establish this, we must also have the ServerName to IP address mapping stored in DNS tables DirectoryIndex – a list of files that the server will attempt to find in a given directory if no file name is given in the URL e.g., DirectoryIndex index.html index.shtml index.php if the URL is /someserver.com/foo/ then it will look for the file foo/index.html, foo/index.shtml and foo/index.php
Image of page 4
Image of page 5
  • Fall '19

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes