>>>>> "John" == John Fraser <[EMAIL PROTECTED]> writes:
John> It does, but mod_perl is not built into Apache.
This is "OSX" we're talking about, right? It does indeed come with
mod_perl, and it works just fine. See /etc/httpd/httpd.conf to make
the tweaks.
What I did to keep the core conf file clean was create
~merlyn/Sites/.httpd.conf and then symlink that into
/etc/httpd/users/merlyn.conf . That means I can edit a file without
going sudo, and stop/start my server from the sharing preferences
pane, and it will be considered part of the system conf file.
Here's a few lines from my local conf file. I set up a server-info,
a server-status, a mod_perl url (/perl) and a mod_cgi url (/cgi),
as well as permitting others to browse my music collection (/Music),
and a local caching proxy server (point my browser at :8800).
Now, I also have another apache-ssl-modperl in another area on my
laptop, but that's so I can clone stonehenge.com's exact configuration
for local editing, and that's all I use it for. I use the built-in
server for all my in-class demos and quick testing.
## ln -s $this_file /etc/httpd/users/merlyn.conf
LoadModule status_module libexec/httpd/mod_status.so
LoadModule info_module libexec/httpd/mod_info.so
LoadModule proxy_module libexec/httpd/libproxy.so
LoadModule ssl_module libexec/httpd/libssl.so
LoadModule perl_module libexec/httpd/libperl.so
<Directory /Users/merlyn/Sites>
Options All
AllowOverride All
</Directory>
<Directory /Users/merlyn/Sites/perl>
Options +ExecCGI
SetHandler perl-script
PerlHandler Apache::Registry
</Directory>
<Directory /Users/merlyn/Sites/cgi>
Options +ExecCGI
SetHandler cgi-script
</Directory>
<Location /server-info>
SetHandler server-info
Order allow,deny
Allow from all
</Location>
<Location /server-status>
SetHandler server-status
Order allow,deny
Allow from all
</Location>
Alias /Music/ "/Users/merlyn/Music/iTunes/iTunes Music/"
<Directory /Users/merlyn/Music>
Options +Indexes
</Directory>
## have to have this, or else we don't listen on 80 anymore
Listen 0.0.0.0:80
## set up a proxy caching server
Listen 127.0.0.1:8800
<VirtualHost 127.0.0.1:8800>
## allow proxy requests from localhost
ProxyRequests On
<Directory proxy:*>
Order allow,deny
## default is deny
Allow from 127.0.0.1
</Directory>
## deny normal requests
<Location />
Order allow,deny
## default is deny
</Location>
ProxyVia On
CacheRoot "/private/var/run/proxy"
CacheSize 5
CacheGcInterval 4
CacheMaxExpire 24
CacheLastModifiedFactor 0.1
CacheDefaultExpire 1
</VirtualHost>
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[email protected]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!