1 / 8

Day 15

Day 15. Apache. Being a web server. Once your system is correctly connected to the network, you could be a web server. When you go to a web site such as http://www.cnn.com You are connecting to a machine which has web server software running on it.

Download Presentation

Day 15

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Day 15 Apache

  2. Being a web server • Once your system is correctly connected to the network, you could be a web server. • When you go to a web site such as http://www.cnn.com • You are connecting to a machine which has web server software running on it. • If the machine is running Windows, you are most likely talking to IIS server. • If it is running Unix of some form, you are most likely talking to Apache server. • Netscape also makes web servers, many people use them also, they are available for both windows and Unix.

  3. Apache • Apache is nothing more than a daemon which listens on port TCP 80 for incoming requests. • It then serves appropriate files from your hard drive in response to those requests.

  4. Document Root • All web servers have a notion of a document root. • This is the only place on the hard drive that users on the web can request documents from. • This protect average files from being viewed across the internet. • The web server will upon startup immediately run a chroot command to prevent itself from being tricked into looking at parts of the hard drive it doesn’t have permissions to.

  5. Permissions • All files in the document root should probably be world readable. • The apache daemon actually runs as a user [typically “nobody”] and as long as that user has permission to view the files, they will be available on the web.

  6. Starting/Stopping Apache • Apache runs as a regular process, just like anything else. • Usually called • httpd • You could kill it, however you are advised to use the commands: • apache start • apache stop • To start or stop it. This gives apache a chance to update some other stuff.

  7. Configuring Apache • Apache will create a directory into which it will put all its files: • Usually either: • /usr/local/apache • /var/httpd/ • In the directory, you will find a conf directory, and in there you will find a httpd.conf file. • This is where all configuration options of Apache are set.

  8. Apache logs. • The log files for apache are stored in • /var/log/httpd/access.log • /var/log/httpd/errors.log • These are rotated and removed as often as you tell it to.

More Related