You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Mr. Egomaniac" <eg...@hotmail.com> on 2004/03/17 01:13:05 UTC

Installation / Configuration Questions

Greetings,

I realize that this might be a newbie/already answered question, but I've 
looked all over and can't seem to find anything that will help.  So here 
goes:

I am trying to install an apache 1.3.29 server with mod_perl 1.29.  I've 
configured and tested both, and all seem to be working as expected.

1) /usr/local/src/new-install/mod_perl-1.29/make test
   passes all tests but one.  ie) 1/39



2)
[root@leviathan logs]# apachectl restart
/www/bin/apachectl restart: httpd restarted
[root@leviathan logs]# tail -f error_log
[Tue Mar 16 18:03:05 2004] [notice] / (Unix) mod_perl/1.29 mod_ssl/2.8.16 
OpenSSL/0.9.7c PHP/4.3.4 configured -- resuming normal operations
[Tue Mar 16 18:03:05 2004] [notice] Accept mutex: sysvsem (Default: sysvsem

This tells me that mod_perl has been installed properly.

3) my http is as normal:

Alias /perl/ /www/mod_perl/
<Location /perl/>
        SetHandler perl-script
        PerlHandler Apache::Registry
        Options +ExecCGI
        #PerlSendHeader On
        #allow from all
</Location>

4) My mod_perl directory has permissions that should allow a browser to 
read/execute from it:
    drwxr-xr-x    3 root     root         4096 Mar 11 13:10 mod_perl/

5)  my script works in the mod_perl directory
    !/usr/bin/perl
    print("content-type: text/html\n\n");
    print("<H1><Center>Hello World</CENTER><h1>\n");

6) with appropriate permissions:
    rwx------    1 nobody   nogroup       103 Mar 16 18:07 test.pl*

Now, with this configuration, I would expect a browser attempting to access 
localhost/perl/test.pl to get a page with Hello World string centered in h1 
font.

Instead:  You don't have permission to access /perl/test.pl on this server.

access_log says:
127.0.0.1 - - [16/Mar/2004:18:10:47 -0500] "GET /perl/test.pl HTTP/1.0" 403 
303

error_log says: [Tue Mar 16 18:10:47 2004] [error] [client 127.0.0.1] client 
denied by server configuration: /www/mod_perl/test.pl


what am I doing wrong?  Any ideas are appreciated.  Please CC my email addy 
too:  mailto://egomaniac1992@hotmail.com




<!-- Death Becomes Me

_________________________________________________________________
Add photos to your messages with MSN Premium. Get 2 months FREE*  
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Installation / Configuration Questions

Posted by "David (Sniper) Rigaudiere -- Les mongueurs de Perl" <sn...@mongueurs.net>.
> 5)  my script works in the mod_perl directory
>     !/usr/bin/perl
>     print("content-type: text/html\n\n");
>     print("<H1><Center>Hello World</CENTER><h1>\n");

Hello,
the # is missing on the shebang line,
is this a copy/paste error ?

David "Sniper" Rigaudiere
GPG KeyID 0x2D243742

French Perl Workshop 2004 june 6, 7
http://conferences.mongueurs.net/2004/


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Installation / Configuration Questions

Posted by Perrin Harkins <pe...@elem.com>.
On Tue, 2004-03-16 at 19:13, Mr. Egomaniac wrote:
> Now, with this configuration, I would expect a browser attempting to access 
> localhost/perl/test.pl to get a page with Hello World string centered in h1 
> font.
> 
> Instead:  You don't have permission to access /perl/test.pl on this server.

You should su to the user that you run apache as (probably "nobody") and
see if it will let you execute that script.  Remember that the whole
path counts, so if the /www directory in /www/mod_perl/test.pl is not
set up correctly, it won't matter how the permissions on your script are
set.

- Perrin


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Installation / Configuration Questions

Posted by Ged Haywood <ge...@jubileegroup.co.uk>.
Hi there,

On Tue, 16 Mar 2004, Mr. Egomaniac wrote:

> I realize that this might be a newbie/already answered question

:)

> I've looked all over and can't seem to find anything that will help.

Well you didn't search the list archives very thoroughly... :)

http://www.gossamer-threads.com/perl/mailarc/gforum.cgi?post=114129;search_string=total%20newbie%20question;guest=2622237&t=search_engine#114129

And you didn't read the documentation about reporting problems:

http://perl.apache.org/docs/1.0/guide/help.html#How_to_Report_Problems

I make that 9,213 including the list signatures. :)

http://www.gossamer-threads.com/perl/mailarc/gforum.cgi?post=114085;search_string=10%2C000;guest=2622237&t=search_engine#114085

> 3) my http is as normal:
>
> Alias /perl/ /www/mod_perl/
> <Location /perl/>
>         SetHandler perl-script
>         PerlHandler Apache::Registry
>         Options +ExecCGI
>         #PerlSendHeader On
>         #allow from all
> </Location>

Not sure what 'normal' is.  You mean you're using Apache::Registry normally?

> 4) My mod_perl directory has permissions that should allow a browser to
> read/execute from it:
>     drwxr-xr-x    3 root     root         4096 Mar 11 13:10 mod_perl/

What about the directories above it?

> 5)  my script works in the mod_perl directory
>     !/usr/bin/perl
>     print("content-type: text/html\n\n");
>     print("<H1><Center>Hello World</CENTER><h1>\n");

That script has a serious error.  I'll leave you to find it.
Did you type it in by hand (never do that) or did you grab it
using copy/paste or an editor (always do that).

> 6) with appropriate permissions:
>     rwx------    1 nobody   nogroup       103 Mar 16 18:07 test.pl*

If that script ever can be run, and if the user 'nobody' can change
that script, then you can expect that user to have rooted your server.
Do please read up on security in Apache and mod_perl.  Make scripts
writeable only by root and readable/executable by the Apache uid/gid.
You haven't given the bits of httpd.conf which tell us what user and
group are used for the Apache children so I don't know if 'nobody' and
'nogroup' are right.

73,
Ged.

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html