You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by john knops <jk...@goulburn.net.au> on 2002/09/05 08:33:21 UTC
[users@httpd] Apache 1.3.23 Configuration Allows html pages but not Perl scripts
I'm running Linux Mandrake 8.2 and I've installed Apache 1.3 which came
bundled with it.This version has 3 configuration files - httpd.conf,
httpd-perl.conf & commonhttpd.conf.
I'm also going to install MySQL and use them together as a learning aid
and test-bed before I release my web pages to the world.
As installed I can display the Apache index page and test.pl.in the
Browser so that I know Apache is running OK.
I have set up my home directory to contain 2 sub-directories, /web/www/
& /web/cgi-bin/. /web/www/ contains index.html & /web/cgi-bin/ contains
test_a.pl
After changing the DocumentRoot to:- /home/j/web/www I can display my
own index page and any other html docs. in /www/. However other changes
that I made don't allow me to display scripts in /cgi-bin/. Instead in
the browser I get:-FORBIDDEN. You don't have permission to access
/cgi-bin/test_a.pl on this server.
The corresponding error log reads:-[client127.0.01] client denied by
server configuration: /home/j/web/cgi-bin/test_a.pl
Permissions for /home/, /j/, /web/,& /cgi-bin/ directories and
test_a.pl are all rwxr-xr-x.
I have also run apachectl configtest with the following result:-
Checking configuration sanity for httpd [OK]
Checking configuration sanity for httpd-perl [OK]
One of the FAQ's on the Apache web site suggests looking for an entry
<Files ~> and if found either deleting it or changing it to
<Files ~"^\.ht>. Commonhttpd.conf contains the latter so I haven't
touched it
These are the changes that I've made:-
added Alias /cgi-bin/ /home/j/web/cgi-bin/
ScriptAlias /cgi-bin/ /var/www/cgi-bin now:-
/cgi-bin/ /home/j/web/cgi-bin/
ScriptAlias /protected-cgi-bin/ /var/www/protected-cgi-bin/ now;-
/protected-cgi-bin/ /home/j/web/protected-cgi-bin/
Within <IfModule mod_perl.c>
Alias /perl/ /var/www/perl/ now:- /perl/ /home/j/web/perl/
Alias /cgi-perl/ /var/www/cgi-perl now:-
/cgi-perl/ /home/j/web/cgi-perl/
AddHandler cgi-script .cgi now:- AddHandler cgi-script .pl
<Directory /var/www/html> now:- <Directory /home/j/web/www>
<Directory /var/www/perl> now:- <Directory /home/j/web/perl>
<Directory /var/www/cgi-bin> now:- <Directory /home/j/web/cgi-bin>
<Directory /var/www/protected-cgi-bin> now:-
<directory /home/j/web/protected-cgi-bin>
The annoying part of all this is before I re-installed Mandrake I was
running Mandrake8.1 and everything worked fine!
Any help anyone can give will be appreciated. Apart from RTFM & STFW
that is. I've already done this many times. Of course I've probably
missed the relevant parts so if you could just point me...
Thanks,
John.
---------------------------------------------------------------------
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] Apache 1.3.23 Configuration Allows html pages but not Perl scripts
Posted by "i.t" <i....@ithum.de>.
> I'm also going to install MySQL and use them together as a learning aid
> and test-bed before I release my web pages to the world.
>
...
> Permissions for /home/, /j/, /web/,& /cgi-bin/ directories and
> test_a.pl are all rwxr-xr-x.
you do NOT need necessarily world-readable cgi-bin
> I have also run apachectl configtest with the following result:-
> Checking configuration sanity for httpd [OK]
> Checking configuration sanity for httpd-perl [OK]
> The annoying part of all this is before I re-installed Mandrake I was
> running Mandrake8.1 and everything worked fine!
>
> Any help anyone can give will be appreciated. Apart from RTFM & STFW
> that is. I've already done this many times. Of course I've probably
> missed the relevant parts so if you could just point me...
>
> Thanks,
> John.
that seems to be very Mandrake-specific; it looks like your changes have not
been adapted. Is there an Include directive for http-perl.conf? Have you made
the changes there, too?
Anyway, if you're on the learning road targeting apache + mysql I'd suggest
you to download an apache 1.3.26 tarball,
extract in /usr/local/ and compile it --with-port=82 so you can fire it up
immediately. If you have a bit more understanding stop the Mandrake
perl-httpd, replace port 82 with 80 in your /usr/local conf, replace the
binary httpd in /usr/sbin (make a copy to httpd.orig), and replace the
httpd.conf in /etc/httpd/conf (make a copy). So on system startup your server
is called by the init scripts.
That way everything should work as you expected :-
--
_ ___
| | Irmund Thum
| |
---------------------------------------------------------------------
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