Hi everyone,
I'm having trouble with my default index file (DirectoryIndex) in Apache
2. No matter what I try to do, index.pl does not show up as the default
page. Instead, Apache gives me a directory listing. I've tried
searching various lists and forums but I cannot find a straightforward
solution.
My Perl is setup fine such that when I click on index.pl, the correct
pages are executed and displayed.
Can someone point me in the right direction to find out why I cannot get
index.pl to show by default?
Below are the pertinent sections of the httpd.conf. I'm running:
- Apache 2.0.54
- ModPerl 2.0.1
- Perl 5.8.7
If I can provide any additional information, just let me know.
Thank you,
Dickon...
----------------
[...]
# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule perl_module /usr/local/libexec/apache2/mod_perl.so
[...]
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
[...]
# Default <Directory> with comments removed
<Directory "/usr/local/www/data">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
[...]
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents. The MultiViews Option can be used for the
# same purpose, but it is much slower.
#
DirectoryIndex index.html index.html.var index.pl
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
[...]
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
#AddHandler cgi-script .cgi
[...]
<VirtualHost *:80>
ServerName 10.1.1.249
DocumentRoot /usr/local/www/data/
UseCanonicalName Off
VirtualDocumentRoot /usr/local/www/data/
LogFormat "%V %h %l %u %t \"%r\" %s %b" combined
ErrorLog /var/log/apache/error.log
CustomLog /var/log/apache/access.log combined
PerlRequire "/usr/local/www/data/setcwd.pl"
<Directory "/usr/local/www/data/">
SetHandler perl-script
PerlResponseHandler ModPerl::RegistryPrefork
PerlSendHeader Off
AllowOverride None
Options +ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>