David:
Thanks!
You are right - it works from the cgi-bin directory.
Now why oh why did they ship the mod_perl.conf file that way when they
had created the directory /srv/www/perl-lib to put perl scripts in?
The next question is - how do you fix the file to get it to work?
Contents of the default mod_perl.conf in OpenSuse 10.2 below -
....mod_perl.conf.......
<Directory "/srv/www/perl-lib">
AllowOverride None
Options None
Order allow,deny
Deny from all
</Directory>
<IfModule mod_perl.c>
PerlRequire "/etc/apache2/mod_perl-startup.pl"
ScriptAlias /perl/ "/srv/www/cgi-bin/"
<Location /perl/>
# mod_perl mode
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
Options +ExecCGI
</Location>
ScriptAlias /cgi-perl/ "/srv/www/cgi-bin/"
<Location /cgi-perl>
# perl cgi mode
SetHandler perl-script
PerlResponseHandler ModPerl::PerlRun
PerlOptions +ParseHeaders
Options +ExecCGI
</Location>
# The /cgi-bin/ ScriptAlias is already set up in httpd.conf
</IfModule>
# vim: ft=apache
.............................................................................
Thanks!
Michael
On 3/15/07, David Bolt <[EMAIL PROTECTED]> wrote:
On Wed, 14 Mar 2007, Michael Folsom <[EMAIL PROTECTED]> wrote:-
>Folks:
>
>New to mod_perl and am having trouble getting mod_perl going on OpenSuse 10.2.
>
>Have a system with apache installed and working and used yast to
>install mod_perl from the install DVD. It created the directory
>/srv/www/perl-lib and in /etc/apache2 I find mod_perl-startup.pl and
>in /etc/apache2/conf.d I find mod_perl.conf.
>
>Problem is when I dropped the file rock.pl (see below) in
>/srv/www/perl-lib it doesn't run - meaning I go to
>http://server_name/perl-lib/rock.pl in a browser and get an "Object
>not found!".
Not surprising really. If you look at mod_perl.conf, you'll find the
first few lines are:
<Directory "/srv/www/perl-lib">
AllowOverride None
Options None
Order allow,deny
Deny from all
</Directory>
Meaning that apache will refuse to show any files in there.
>Permissions on rock.pl:
> -rwxr-xr-x 1 nobody nobody 85 2007-03-14 21:56 rock.pl
>
>........................... rock.pl
>#!/usr/bin/perl
>print "Content-type: text/plain\n\n";
>print "mod_perl 2.0 rocks!\n";
>
>Suggestions appreciated!
Copy it into /cgi-bin/ ? It'll work from there:
[EMAIL PROTECTED]:~> cat /srv/www/cgi-bin/test.pl
#!/usr/bin/perl
print "Content-type: text/plain\n\n";
print "mod_perl 2.0 rocks!\n";
[EMAIL PROTECTED]:~> telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /cgi-bin/test.pl HTTP/1.0
HTTP/1.1 200 OK
Date: Thu, 15 Mar 2007 17:42:46 GMT
Server: Apache/2.2.3 (Linux/SUSE)
Content-Length: 20
Connection: close
Content-Type: text/plain
mod_perl 2.0 rocks!
Connection closed by foreign host.
Regards,
David Bolt
--
Member of Team Acorn checking nodes at 50 Mnodes/s: http://www.distributed.net/
RISCOS 3.11 | SUSE 10.0 32bit | SUSE 10.1 32bit | openSUSE 10.2 32bit
RISCOS 3.6 | SUSE 10.0 64bit | SUSE 10.1 64bit | openSUSE 10.2 64bit
TOS 4.02 | SUSE 9.3 32bit | | openSUSE 10.3a1 32bit
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]