Anti-Web Quick-Start Guide ~~~~~~~~~~~~~~~~~~~~~~~~~~ This is a guide to get Anti-Web up and running quickly. It is not meant to be a definitive manual. For that, see the file MANUAL. [*] Introduction [*] Compilation [*] Simple Configuration [*] Complex Configuration [*] Introduction ~~~~~~~~~~~~~~~~ Anti-Web is a light-weight, single-process, non-threaded webserver that emphasizes simplicity, efficiency, and security. AW 3 is the result of a rewrite of the webserver's internals and represents much thought, effort, and careful design by the AW team. With a few (perhaps signifigant) exceptions, AW 3 should be drop in compatible with AW 2. To use this drop in compatibility, refer to the "Simple Configuration" section. If you want to use some of AW 3's more advanced features, refer to the "Complex Configuration" section. Your rights to use, distribute, and modify AW are protected by the GNU GPL license. Please see the file COPYING for more details. [*] Compilation ~~~~~~~~~~~~~~~ You should be able to compile AW simply by extracting it, changing into the extracted directory and typing make If all goes well, you should end up with an executable called "awhttpd". If all does not go well, check the top of the file Makefile for compilation options. You will need to do this for a SunOS compilation, for instance. [*] Simple Configuration ~~~~~~~~~~~~~~~~~~~~~~~~ Most simply, AW 3 can be run like so: awhttpd where directory contains your HTML tree and port is the port that you want AW to listen for connections on. You must also make sure that the permissions in your HTML tree are set up in a sane manner: - All of the specified files/directories should be world readable: chmod -R a+r /var/webpage/ - All the directories should be world listable and world readable: chmod a+x `find /var/webpage/ -type d` - Ideally all files should be owned by a different user than AW is run as, although you can only do this if you have root access. (In this mode, AW will run as UID 32767) Finally, you should put the awhttpd binary in a directory and include a line to start AW in your startup scripts. (Typically /etc/rc*) For example: /usr/local/sbin/awhttpd /var/webpage 80 [*] Complex Configuration ~~~~~~~~~~~~~~~~~~~~~~~~~ AW 3 can also be run like so: awhttpd where directory contains: - A file "awhttpd.conf" that specifies some basic parameters. Use the example file included in the AW distribution. You probably won't need to edit this file but if you do, the included conf file is extensively commented. - A directory called "default" that contains the default HTML tree that you want people to view. - Optional: Various other directories corresponding to virtual hosts. For instance, you might want to have different HTML trees for different websites. IE: "example.com/" (don't forget to symlink "www.example.com/" to "example.com/" if your DNS is set up to resolve both!) If the client does not specify a virtual host or the virtual host specified is not found, the client will be given the pages in the "default/" directory. - Optionally, CGI scripts. Any directory that files can be served from, so can CGI scripts. You must set the extension in the conf file and make the CGI script world executable. See the file SCRIPTING for more details. You must also make sure that the permissions in your AW directory are set up in a sane manner: - All of the above files/directories should be world readable: chmod -R a+r /var/webpage/ - All the directories should be world listable and world readable: chmod a+x `find /var/webpage/ -type d` - All the CGI files should be world executable, though not set UID. chmod a+x /var/webpage/my_cgi_script.php - Ideally all files should be owned by a different user than AW is run as, although you can only do this if you have root access. Finally, you should put the awhttpd binary in a directory and include a line to start AW in your startup scripts. For example: /usr/local/sbin/awhttpd /var/webpage Doug Hoyte (Fractal) (C) 2004 HCSW, Doug Hoyte