You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Q.L" <sh...@yahoo.ca> on 2003/12/18 08:36:11 UTC

[users@httpd] index file won't execute automatically.

Hi,

i have following lines in the httpd.conf. however, the index.pl in the directory won't get
executed automatically if only requesting the directory. instead i got the list of directory.

it only works if i request the file directly. i.e example.com/printer/index.pl but not
example.com/printer/

Alias /printer/ /www/printer/
PerlModule ModPerl::Registry
<Location /printer/>
    Order allow,deny
    Allow from all
    AllowOverride None
    SetHandler perl-script
    PerlHandler ModPerl::Registry
    Options +ExecCGI
    PerlSendHeader On
    DirectoryIndex index.pl
</Location>

i have Apache/2.0.40 on linux.

i don't see what's wrong here. anyone has idea for this ?


Qiang.



______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] index file won't execute automatically.

Posted by "Q.L" <sh...@yahoo.ca>.
 --- Luis Fernando Gallegos Valencia <lf...@pichincha.com> wrote: > In the DirectoryIndex
directive put index.pl , so if there is not any
> index.html file in that directory , index.pl would be rendered.
> 
> For example:
> DirectoryIndex   index.html index.pl  #would render index.pl if no
> index.html exists
> 

i already have the DirectoryIndex index.pl in the config. 

okay. now i change it little bit and
got "Directory index forbidden by rule: /www/printer/" while  requesting site.com/printer 

request site.com/printer/index.pl  directly is fine.

Alias /printer /www/printer
PerlModule ModPerl::Registry
<Location /printer>
#    Order allow,deny
    Allow from all
#    AllowOverride None
    SetHandler perl-script
    PerlHandler ModPerl::Registry
    Options ExecCGI
    PerlSendHeader On
    DirectoryIndex index.pl index.html
</Location>


> 
> On Fri, 2003-12-19 at 10:04, Q.L wrote:
> >  --- Don <dn...@san.rr.com> wrote: > On Thu, 2003-12-18 at 21:00, Q.L wrote:
> > > >  --- Don <dn...@san.rr.com> wrote: > On Thu, 2003-12-18 at 18:49, dSc wrote:
> > > > > > Try leaving the  / off the end of.
> > > > > > Alias /printer/ /www/printer
> > > > > 
> > > > > Alias /printer /www/printer
> > > > > 
> > > > > (note no / after the alias name...)
> > > > > 
> > > > 
> > > > i changed it and it still list the directory while requesting mysite.com/printer
> > > > 
> > > > here is what i have now.
> > > > 
> > > > Alias /printer /www/printer
> > > > PerlModule ModPerl::Registry
> > > > <Directory /www/printer>
> > > >     Order allow,deny
> > > >     Allow from all
> > > >     AllowOverride None
> > > >     SetHandler perl-script
> > > >     PerlHandler ModPerl::Registry
> > > >     Options +ExecCGI
> > > >     PerlSendHeader On
> > > >     DirectoryIndex index.pl
> > > > </Directory>
> > > 
> > > OK... obvious question.... does the directory contain an "index.pl"
> > > file, and Apache has rx access to it?
> > 
> > as i said, i can only access that index.pl by request it directly.
> > so the file is there and is 755 permission.
> > 
> > i know this problem sound weird.. but hopefully someone can point out what i am doing wrong.
> > 
> > thanks.
> > 
> > 
> > Qiang
> > 
> > ______________________________________________________________________ 
> > Post your free ad now! http://personals.yahoo.ca
> > 
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>  

______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] index file won't execute automatically.

Posted by Luis Fernando Gallegos Valencia <lf...@pichincha.com>.
In the DirectoryIndex directive put index.pl , so if there is not any
index.html file in that directory , index.pl would be rendered.

For example:
DirectoryIndex   index.html index.pl  #would render index.pl if no
index.html exists




On Fri, 2003-12-19 at 10:04, Q.L wrote:
>  --- Don <dn...@san.rr.com> wrote: > On Thu, 2003-12-18 at 21:00, Q.L wrote:
> > >  --- Don <dn...@san.rr.com> wrote: > On Thu, 2003-12-18 at 18:49, dSc wrote:
> > > > > Try leaving the  / off the end of.
> > > > > Alias /printer/ /www/printer
> > > > 
> > > > Alias /printer /www/printer
> > > > 
> > > > (note no / after the alias name...)
> > > > 
> > > 
> > > i changed it and it still list the directory while requesting mysite.com/printer
> > > 
> > > here is what i have now.
> > > 
> > > Alias /printer /www/printer
> > > PerlModule ModPerl::Registry
> > > <Directory /www/printer>
> > >     Order allow,deny
> > >     Allow from all
> > >     AllowOverride None
> > >     SetHandler perl-script
> > >     PerlHandler ModPerl::Registry
> > >     Options +ExecCGI
> > >     PerlSendHeader On
> > >     DirectoryIndex index.pl
> > > </Directory>
> > 
> > OK... obvious question.... does the directory contain an "index.pl"
> > file, and Apache has rx access to it?
> 
> as i said, i can only access that index.pl by request it directly.
> so the file is there and is 755 permission.
> 
> i know this problem sound weird.. but hopefully someone can point out what i am doing wrong.
> 
> thanks.
> 
> 
> Qiang
> 
> ______________________________________________________________________ 
> Post your free ad now! http://personals.yahoo.ca
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] index file won't execute automatically.

Posted by "Q.L" <sh...@yahoo.ca>.
 --- Nick Kew <ni...@webthing.com> wrote: > > i know this problem sound weird.. but hopefully
someone can point out
>   what i am doing wrong.
> 
> Didn't you sort this out on IRC last night?  Someone had an identical
> problem, that was fixed by using CGI-under-mod_cgi instead of
> CGI-under-mod_perl.
> 

that is NOT a fix. i want to use mod_perl not mod_cgi.

besides, what's wrong with what i have now?



> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>  

______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] index file won't execute automatically.

Posted by Nick Kew <ni...@webthing.com>.
> i know this problem sound weird.. but hopefully someone can point out
  what i am doing wrong.

Didn't you sort this out on IRC last night?  Someone had an identical
problem, that was fixed by using CGI-under-mod_cgi instead of
CGI-under-mod_perl.

-- 
Nick Kew


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] index file won't execute automatically.

Posted by "Q.L" <sh...@yahoo.ca>.
 --- Don <dn...@san.rr.com> wrote: > On Thu, 2003-12-18 at 21:00, Q.L wrote:
> >  --- Don <dn...@san.rr.com> wrote: > On Thu, 2003-12-18 at 18:49, dSc wrote:
> > > > Try leaving the  / off the end of.
> > > > Alias /printer/ /www/printer
> > > 
> > > Alias /printer /www/printer
> > > 
> > > (note no / after the alias name...)
> > > 
> > 
> > i changed it and it still list the directory while requesting mysite.com/printer
> > 
> > here is what i have now.
> > 
> > Alias /printer /www/printer
> > PerlModule ModPerl::Registry
> > <Directory /www/printer>
> >     Order allow,deny
> >     Allow from all
> >     AllowOverride None
> >     SetHandler perl-script
> >     PerlHandler ModPerl::Registry
> >     Options +ExecCGI
> >     PerlSendHeader On
> >     DirectoryIndex index.pl
> > </Directory>
> 
> OK... obvious question.... does the directory contain an "index.pl"
> file, and Apache has rx access to it?

as i said, i can only access that index.pl by request it directly.
so the file is there and is 755 permission.

i know this problem sound weird.. but hopefully someone can point out what i am doing wrong.

thanks.


Qiang

______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] index file won't execute automatically.

Posted by Don <dn...@san.rr.com>.
On Thu, 2003-12-18 at 21:00, Q.L wrote:
>  --- Don <dn...@san.rr.com> wrote: > On Thu, 2003-12-18 at 18:49, dSc wrote:
> > > Try leaving the  / off the end of.
> > > Alias /printer/ /www/printer
> > 
> > Alias /printer /www/printer
> > 
> > (note no / after the alias name...)
> > 
> 
> i changed it and it still list the directory while requesting mysite.com/printer
> 
> here is what i have now.
> 
> Alias /printer /www/printer
> PerlModule ModPerl::Registry
> <Directory /www/printer>
>     Order allow,deny
>     Allow from all
>     AllowOverride None
>     SetHandler perl-script
>     PerlHandler ModPerl::Registry
>     Options +ExecCGI
>     PerlSendHeader On
>     DirectoryIndex index.pl
> </Directory>

OK... obvious question.... does the directory contain an "index.pl"
file, and Apache has rx access to it?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] index file won't execute automatically.

Posted by "Q.L" <sh...@yahoo.ca>.
 --- Don <dn...@san.rr.com> wrote: > On Thu, 2003-12-18 at 18:49, dSc wrote:
> > Try leaving the  / off the end of.
> > Alias /printer/ /www/printer
> 
> Alias /printer /www/printer
> 
> (note no / after the alias name...)
> 

i changed it and it still list the directory while requesting mysite.com/printer

here is what i have now.

Alias /printer /www/printer
PerlModule ModPerl::Registry
<Directory /www/printer>
    Order allow,deny
    Allow from all
    AllowOverride None
    SetHandler perl-script
    PerlHandler ModPerl::Registry
    Options +ExecCGI
    PerlSendHeader On
    DirectoryIndex index.pl
</Directory>


______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] index file won't execute automatically.

Posted by Don <dn...@san.rr.com>.
On Thu, 2003-12-18 at 18:49, dSc wrote:
> Try leaving the  / off the end of.
> Alias /printer/ /www/printer

Alias /printer /www/printer

(note no / after the alias name...)



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] index file won't execute automatically.

Posted by dSc <mr...@hotmail.com>.
Try leaving the  / off the end of.
Alias /printer/ /www/printer

----- Original Message ----- 
From: "Q.L" <sh...@yahoo.ca>
To: <us...@httpd.apache.org>
Sent: Thursday, December 18, 2003 1:36 AM
Subject: [users@httpd] index file won't execute automatically.


: Hi,
:
: i have following lines in the httpd.conf. however, the index.pl in the
directory won't get
: executed automatically if only requesting the directory. instead i got the
list of directory.
:
: it only works if i request the file directly. i.e
example.com/printer/index.pl but not
: example.com/printer/
:
: Alias /printer/ /www/printer/
: PerlModule ModPerl::Registry
: <Location /printer/>
:     Order allow,deny
:     Allow from all
:     AllowOverride None
:     SetHandler perl-script
:     PerlHandler ModPerl::Registry
:     Options +ExecCGI
:     PerlSendHeader On
:     DirectoryIndex index.pl
: </Location>
:
: i have Apache/2.0.40 on linux.
:
: i don't see what's wrong here. anyone has idea for this ?
:
:
: Qiang.
:
:
:
: ______________________________________________________________________
: Post your free ad now! http://personals.yahoo.ca
:
: ---------------------------------------------------------------------
: The official User-To-User support forum of the Apache HTTP Server Project.
: See <URL:http://httpd.apache.org/userslist.html> for more info.
: To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
:    "   from the digest: users-digest-unsubscribe@httpd.apache.org
: For additional commands, e-mail: users-help@httpd.apache.org
:
:

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org