Valid
	XHTML 1.1! Valid CSS!
Created 2010-12-10   Modified 2010-12-11
Chelton Evans

../images/book_uni.gif Apache home

# /etc/init.d/apache2 <restart,reload>
  each time configuration file changed
# apache2ctl configtest reloading does the same

Apache Hell - Ubuntu

# apt-get install apache2

Re install php5 mod
# apt-get install libapache2-mod-php5

# apt-get install libapache2-mod-perl2

httpd.conf

AddType application/x-httpd-php .php
AddHandler php5-script php

AddType application/x-httpd-perl .pl 

# http://ubuntuforums.org/archive/index.php/t-78161.htm
<Files ~ "\.(pl|cgi)$">
SetHandler perl-script
PerlResponseHandler ModPerl::PerlRun
Options +ExecCGI
PerlSendHeader On
</Files>

Directory Structure

# /etc/apache2/apache2.conf
# /etc/apache2/httpd.conf   most important.

Logs
/var/log/apache2/ access.log error.log other_vhosts_access.log

default directory
/var/www/index.html
/etc/apache2/sites-enabled/000-default

# /etc/apache2/mods-enabled/ shows the modules loaded. e.g. To run perl, perl.load needed to appear in the mode-enabled directory.
# /etc/apache2/mods-available/ shows available.


  DocumentRoot /var/www
  <Directory />
  
  </Directory>
  &tl;Directory /var/www/>
    ...
  </Directory>

Permissions

chmod a+rx <file>

Can use OS's ACL's on files.

Security

Applications