SourceForge Logo

Apache modules description

Apache modules team:   Artur Hefczyc  
WTTools site:   More WTTools

This is version 0.1.0 of wttools_apache_modules.

WHAT IS WTTOOLS?

WTTools is shortcut for "Web Test Tools" you can find more details at http://wttools.sourceforge.net/.

WHAT IS WTTOOLS_APACHE_MODULES?

This is dynamic pages generator for HTTP clients testing purpose.

At the moment it contains two apache modules:

  1. mod_pagesok_gen.c - this module generates html page with relative urls to last call. All urls are relative to current location and should be resolved as a valid server location.
  2. mod_pages_gen.c - it is very similiar to the above module, but in addition it generates urls in html page which should not be valid server location. In consequence if http client parses given html page and tries to download all found urls it should get error code (404 - Page not found). Which is usefull to test client behaviour on server error.
They generate pages about 10kB long.

INSTALATION

To properly run and use this module you should install it through this steps: (If you use binary files instead of sources you can skip step number 3).

  1. Download last apache_modules release sources here or binaries here from Web Test Tools project page.
  2. Unpack downloaded file for example if you downloaded source package:
    [user@host dir] $ tar -xzvf apache_modules-x.x.x.src.tar.gz 
    
  3. Compile necessary modules for example:
    [user@host dir] $ apxs -o mod_pages_gen.so -c mod_pages_gen.c 
    [user@host dir] $ apxs -o mod_pagesok_gen.so -c mod_pagesok_gen.c 
    
  4. Copy compiled modules to apache modules directory:
    [user@host dir] $ cp -fv mod_pages_gen.so /etc/httpd/modules/
    [user@host dir] $ cp -fv mod_pagesok_gen.so /etc/httpd/modules/
    
  5. Edit http.conf and put some new lines to apache configuration:
    LoadModule pages_gen_module modules/mod_pages_gen.so
    AddModule mod_pages_gen.c
    <Location /generate-test>
    	SetHandler generate-test
    </Location>
    
    LoadModule pagesok_gen_module modules/mod_pagesok_gen.so
    AddModule mod_pagesok_gen.c
    <Location /generateok-test>
    	SetHandler generateok-test
    </Location>
    
    In line <Location /generate-test> you can put some other base url for example "/gen-pages" but you should remember that all generated html pages will contain urls relative to given base url. Of course you can install only one module.
  6. Restart httpd daemon with command acording to OS you use, for example in RedHat linux you can call:
    /etc/init.d/httpd restart 
    
  7. The last step is testing if module is working corectly. Call within your browser or other http client url of the form: 'http://localhost/generate-test' where localhost is address to machine where you install mod_pages_gen.

Need more info?

If you have any problems with this application or you found any bugs or you have any ideas about extending this package, want to join to project or you simply need to contact me please send e-mail to addres: Artur Hefczyc kobit@users.sf.net

This is part of Web Test Tools project.