Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old June 28th, 2001, 11:35 AM
yahnaman yahnaman is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Posts: 6 yahnaman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old June 28th, 2001, 04:28 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Add DirectoryIndex.

Reply With Quote
  #3  
Old June 28th, 2001, 05:02 PM
yahnaman yahnaman is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Posts: 6 yahnaman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
DirectoryIndex is there. That is why I can't figure out why it doesn't work

Reply With Quote
  #4  
Old June 28th, 2001, 11:51 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #5  
Old June 29th, 2001, 10:21 AM
yahnaman yahnaman is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Posts: 6 yahnaman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #6  
Old June 30th, 2001, 12:28 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> 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

Reply With Quote
  #7  
Old July 3rd, 2001, 11:38 AM
yahnaman yahnaman is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Posts: 6 yahnaman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #8  
Old July 3rd, 2001, 01:58 PM
yahnaman yahnaman is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Posts: 6 yahnaman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
  #9  
Old July 3rd, 2001, 02:25 PM
yahnaman yahnaman is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Posts: 6 yahnaman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > URL needs index.html to work?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway