



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Notes; Class: ST BusinessCANCELLED; Subject: Business; University: Mississippi University for Women; Term: Summer 2005;
Typology: Study notes
1 / 5
This page cannot be seen from the preview
Don't miss anything!
Apache Web Server July 27, 2005 What is Apache? o Apache is the most widely used Web server on the Internet today. It is used by such well-known organizations as Amazon.com, Yahoo!, Apple Computers, and Stanford. These multi-billion organizations have the resources to buy any web server software available, but yet they choose to use the freely available Apache web server. Therefore, you know it must be good. o The Apache web server was started when a small group of programmers got together to write code to develop a reliable server for http protocol traffic (the http protocol is used to transfer web traffic). Since each programmer was responsible for writing a path of code, they called their project Apache web server – “a patchy web server.” o Apache is maintained by the Apache Software Foundation and made available at www.apache.org. RedHat provides Apache on its installation CD and off of its website, www.redhat.com. o Apache not only makes a version of its web server for Linux, but also for Windows 2000 Server. Installing Apache Web Server: o Apache may most easily be installed from an RPM. You may install by unpacking the RPM: rpm –i apache-1.3.19-5.i386.rpm o When installed, Apache installs the following files and directories: /etc/httpd/conf – this directory stores all of the Apache configuration files. httpd.conf – this file stores all Apache settings. /etc/rc.d/rc3.d – an already existing directory that contains symbolic links that point to programs that begin at startup. A symbolic link is placed here that points at the Apache Web server. /var/www/html – this directory stores Web pages.
/var/log/httpd – this directory stores all Apache log files. access_log – stores information about each access to your Web server, such as web pages requested, time of the request, IP address of the requester, etc. error_log – similar information to access_log, but with error information and only occurs when errors occur. The httpd.conf File: o Most of the configuration for the Apache web server is done by editing the httpd.conf file. o This file is 1197 lines long. It can take a lot of effort effort to find what you are looking for. o This file contains a number of lines called “directives.” These are lines in the httpd.conf file that direct Apache how you want things done. o Most of the default settings for the directives are okay, but there are a few that network administrators typically change: Directive Default Setting: Description: ServerType (Line 52) standalone Inetd or standalone. Use inetd if you want the inetd service to listen for web page requests and then start Apache. Use standalone if you want Apache to run 24 hours-a-day and listen for its own web page requests. Timeout 300 Number of seconds that Apache will look for the requested web page before sending a timeout message. MaxClients (Line 157) 150 Limit on the number of people who can connect to your web server. DocumentRoot (Line 409) /var/www/html The directory where you will store all general web pages.
o When you install Apache web server on your Linux computer, anybody with a user account may setup their own web site. User web sites are accessed slightly differently than the web site we talked about a few minutes ago. Instead of going to the web address, http://scotttollison.com/ , you go to http://scotttollison.com/~userID to access the web site of an individual user. o User web sites are particularly useful at colleges and universities. Most colleges and universities offer web space to students. These web sites are set up exactly like the ones we will learn about today. Configuring Apache Web Server: o Configuring the Apache web server is done by editing the httpd.conf file. o There are two important directives to setting up a user web site. Directive Default Setting: Description: UserDir public_html Subdirectory in a user’s home directory where they may store their web pages. If I had an wcarr account on the computer my web pages would need to be stored in the /home/wcarr/public_html directory. DirectoryIndex index.html index.htm index.shtml index.php Order in which Apache will look for filenames when web pages requested. How Web Addresses and Apache Interact: o Going to a specific user’s web site differs a little bit. When a user goes to the web site http://scotttollison.com/~wcarr , notice that they specify the location of the web server and the user’s web site that they wish to see.
When Apache receives a request to server this web page, it looks inside the subdirectory of wcarr ’s home directory specified by the UserDir directive. By default, this directory is public_html. Therefore, Apache will look in the / home/wcarr/public_html directory. Once Apache knows where to look, it then looks for the first file specified in the DirectoryIndex directive. By default, this file is index.html. After performing these two steps, it can then feed the /home/wcarr/public_html / index.html file back to the user and it will appear in their web browser.