Apache Webserver - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

Apache Webserver

Description:

Modules may be dynamically added after the application is complied. apxs is a tool for managing dynamic modules. http://httpd.apache.org/docs/1.3/programs/apxs.html ... – PowerPoint PPT presentation

Number of Views:245
Avg rating:3.0/5.0
Slides: 18
Provided by: gil3
Category:

less

Transcript and Presenter's Notes

Title: Apache Webserver


1
Apache Webserver
2
Apache Webserver httpd
  • Hypertext transfer protocol daemon
  • Daemons are applications that run all the time
    listening for a request. When a request is made
    they do something.
  • Developed in 1995
  • Serves 50 of websites

3
HTTPD is Modular
  • mod_php is added to allow php to be processed.
  • Modules may be added when the application is
    complied
  • Modules may be dynamically added after the
    application is complied
  • apxs is a tool for managing dynamic modules
  • http//httpd.apache.org/docs/1.3/programs/apxs.htm
    l

4
Modules in httpd.conf
5
Modules
  • mod_auth_cas
  • http//www.ja-sig.org/wiki/display/CASC/mod_auth_c
    as
  • mod_auth_ldap
  • http//httpd.apache.org/docs/2.0/mod/mod_auth_ldap
    .html
  • mod_proxy_fcgi
  • http//mproxyfcgi.sourceforge.net/

6
Configuring in httpd.conf
  • Httpd.conf is read when httpd starts
  • Restart httpd every time you edit httpd.conf
  • At all times, refer to the apache documenation
  • http//httpd.apache.org/docs/2.2/

7
httpd.conf
  • ltdirectorygt
  • Rules for a folder on the server
  • ltlocationgt
  • Rules for a url
  • ltvirtualhostgt
  • Directive that creates additional hosts on your
    httpd instance.
  • ltIfModulegt
  • Tests of a module is loaded before you attempt to
    configure the module

8
ltdirectorygt
Allows server side includes in the specified
folder
Instructs httpd to follow shortcuts in the
filesystem, to ignore .htaccess files, do not
serve any content
9
ltlocationgt
Requires AFS login to any URL that has an /AFS in
the path
10
ltvirtualhostgt
Creates a virtual host, alert.rpi.edu
11
ltIfModulegt
Only runs the re-write rules if mod_rewrite is
loaded
12
.htaccess
  • Contains instructions, like those found in
    httpd.conf
  • File is parsed every time the server requests a
    resource in that folder, or a downstream folder

13
In Class Work
  • Using mod_rewrite to
  • Proxy
  • Make neato urls
  • Create a httpd servable directory named rewrite

14
In Class Work
  • Allowing .htaccess files in httpd.conf
  • Add the following to httpd.conf
  • ltDirectory /path/to/www/rewritegt
  • AllowOverride All
  • lt/Directorygt
  • Restart httpd

15
In Class Work
  • Create a file named .htaccess in rewrite
  • Add
  • ltIfModule mod_rewrite.cgt
  • RewriteEngine on
  • RewriteBase /rewrite/
  • RewriteRule (.) http//www.cnn.com/ P
  • lt/IfModulegt

16
In Class Work
  • Go to http//localhost/rewrite
  • Rename .htaccess to example1.txt
  • Create another file named .htaccess
  • ltIfModule mod_rewrite.cgt
  • RewriteEngine On
  • RewriteRule /(.) index.php?input1
  • lt/IfModulegt

17
In Class Work
  • Create index.php
  • echo _GETinput
  • Use explode on _GETinput to break the
    input into value key pairs
Write a Comment
User Comments (0)
About PowerShow.com