|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
URL needs index.html to work?
Running Apache 1.3.17 on Solaris 8. This machine is pretty much a duplicate of our production server. The httpd.conf file is from the production machine but edited to reflect the different IP and name of the new machine.
Problem I have is that if I browse to http://machine.domain.com/ I get an error that "The document contains no data". If I browse to http://machine.domain.com/index.html, it works great. I don't know what is different with this machine compared to our production machine. When I originall set up Apache, the default site worked, but now if I switch back to the original httpd.conf, it doesn't work either. Could this be a switch that inadvertanly was added when I compiled Apache? I compiled Apache with mod_perl and mod_rewrite. Thanks in advace for any help. - Matt |
|
#2
|
|||
|
|||
|
Add DirectoryIndex.
|
|
#3
|
|||
|
|||
|
DirectoryIndex is there. That is why I can't figure out why it doesn't work
|
|
#4
|
|||
|
|||
|
How is your mod_perl configured in httpd.conf? By extension or dir?
Say it's handled by extension like .pl, change the order of that in DirectoryIndex to lower priority. Example: DirectoryIndex index.html index.htm index.cgi index.pl It it loads properly, then you have a problem with your index.pl mod_perl script or your mod_perl is misconfigured. |
|
#5
|
|||
|
|||
|
Mod_perl is really only used for one perl file. It is called header.pl and is added to every .html file that we use. It dynamically creates the top of each page.
DirectoryIndex is set up as follows: DirectoryIndex index.html index_hi.html index.cgi index.stml index.shtml index.htm home.cgi home.shtml home.stml home.htm home.html We don't even use index.pl Mod_perl is defined as: <Files /www/www.vni.com/cgi-bin/header.pl> SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI </Files> <Directory /www/www.vni.com> AddHandler header-action .html .htm Action header-action /cgi-bin/header.pl </Directory> Would there be something in me configuring Apache that did not enable the DirectoryIndex? I looked at the readme and it talked about mod_dir, but that is enable by default. |
|
#6
|
|||
|
|||
|
>> We don't even use index.pl
But <Directory /www/www.vni.com> is a problem. You have told Apache to parse all .html and .htm in your docroot (including http://www.domain.com/index.html) by /cgi-bin/header.pl >> Mod_perl is defined as: >> <Files /www/www.vni.com/cgi-bin/header.pl> >> SetHandler perl-script >> PerlHandler Apache::Registry >> Options ExecCGI >> </Files> This is highly misconfigured. <Files> directive takes filename while <Files ~> or <FilesMatch> takes regex matching in filename. If you must use header.pl, use <LocationMatch "^/cgi-bin/header.pl$"> instead. Normally cgi-bin directory is ScriptAlias'ed. mod_perl script is not CGI script, therefore, it should never be placed in cgi-bin directory nor should Options ExecCGI be enabled for mod_perl scripts. You said you also have mod_rewrite enabled, so have you defined anything on that in httpd.conf or .htaccess? You really should read up the docs for mod_perl to find out how to configure it. Here is an example to enable mod_perl by extension of .pl: AddHandler perl-script .pl PerlHandler Apache::Registry PerlSendHeader On |
|
#7
|
|||
|
|||
|
I will pass this along to the webmaster. I actually am just trying to set up the machine to duplicate our production box because the webmaster doesn't know enough about Solaris to do it. I figured that using the same httpd.conf that is running on our production server would be fine.
I will try your suggestions, and also have the webmaster read up on mod_perl and mod_rewrite. Thanks for your help. - Matt |
|
#8
|
|||
|
|||
|
One thing I noticed was that if go back to the original httpd.conf, it does not work either (it has no mod_perl commands or mod_rewrite). If I reinstall apache without activating mod_perl, the default site works, but ours doesn't because it needs mod_perl.
Is there something in the installation of mod_perl that I need to check to verify that it does not break mod_dir? |
|
#9
|
|||
|
|||
|
Fixed the problem. It ends up that I had installed the latest version of Perl (5.6.1) and for some reason Apache doesn't like it. I just install Perl 5.005_03, and now it works great.
Thank you for your help. |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > URL needs index.html to work? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|