Set up Dispatcher on Apache
Install Apache:
Install Apache on Mac
It is also part of xcode http://developer.apple.com/technologies/tools/
Download $ lynx http://httpd.apache.org/download.cgi
Extract $ gzip -d httpd-NN.tar.gz
$ tar xvf httpd-NN.tar
$ cd httpd-NN
Configure $ ./configure --prefix=PREFIX
Compile $ make
Install $ make install
Customize $ vi PREFIX/conf/httpd.conf
Test $ PREFIX/bin/apachectl -k start
Install Dispatcher on Apache:
Apache Dispatcher Zip Content
Dispatcher Specific Configuration
Place the Dispatcher file in the appropriate Apache module directory:
Copy the dispatcher.any file to the <APACHE_ROOT>/conf directory.
The following configuration steps are optional, but recommended:
Apache Dispatcher Specific Configuration
Windows
and
Unix
...
<IfModule disp_apache2.c>
DispatcherConfig conf/dispatcher.any
DispatcherLog logs/dispatcher.log
DispatcherLogLevel 3
DispatcherNoServerHeader 0
DispatcherDeclineRoot 0
DispatcherUseProcessedURL 0
DispatcherPassError 0
</IfModule>
...
The individual configuration parameters:
Dispatcher Set Handler Configuration
Windows
and
Unix
...
<Directory />
<IfModule disp_apache2.c>
SetHandler dispatcher-handler
</IfModule>
Options FollowSymLinks
AllowOverride None
</Directory>
...
The following example configures the Dispatcher to handle requests for a virtual domain:
Windows
Unix
...
<VirtualHost 123.45.67.89>
ServerName www.mycompany.com
DocumentRoot [cache-path]\docs
<Directory [cache-path]\docs>
<IfModule disp_apache2.c>
SetHandler dispatcher-handler
</IfModule>
AllowOverride None
</Directory>
</VirtualHost>
...
...
<VirtualHost 123.45.67.89>
ServerName www.mycompany.com
DocumentRoot /usr/apachecache/docs
<Directory /usr/apachecache/docs>
<IfModule disp_apache2.c>
SetHandler dispatcher-handler
</IfModule>
AllowOverride None
</Directory>
</VirtualHost>
...
Sample Files:
Very Simple httpd.conf
ServerName apache
Listen 8082
User apache
ServerRoot /etc/httpd
DocumentRoot /var/www/html
ServerAdmin webmaster@nowhere.com
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule dir_module modules/mod_dir.so
LoadModule dispatcher_module modules/mod_dispatcher.so
LoadModule mime_module modules/mod_mime.so
TypesConfig conf/mime.types
ModMimeUsePathInfo On #Added to resolve issues in dispatcher bug #34466
KeepAlive on
KeepAliveTimeout 15
TimeOut 30
<IfModule disp_apache2.c>
DispatcherConfig conf/dispatcher.any
DispatcherLog logs/dispatcher.log
DispatcherLogLevel 3
DispatcherNoServerHeader 0
DispatcherDeclineRoot 1
DispatcherUseProcessedURL 1
</IfModule>
<Directory />
#Options -Indexes -MultiViews -FollowSymLinks #Note: Allow symlinks if mod_rewrite is needed
AllowOverride None
<IfModule disp_apache2.c>
SetHandler dispatcher-handler
</IfModule>
</Directory>