httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John M. Dlugosz" <p0cyan...@sneakemail.com>
Subject [users@httpd] Bizarre problem running CGI script
Date Sat, 05 Sep 2009 21:30:26 GMT
I'm ready to tear my hair out!!!

Here is one conf file:

=============
<VirtualHost *>
    ServerAdmin webmaster@localhost
#    ServerName www.LittleRedRidingHood.info
ServerName lrrh.dlugosz.com
        ServerAlias lrrh.lamp4
    DocumentRoot /var/www/lrrh/docroot
    ErrorLog    /var/www/lrrh/logs/error_log
    CustomLog    /var/www/lrrh/logs/access_log combined

    <Directory /var/www/lrrh/docroot>
        AllowOverride None
        Order allow,deny
        allow from all
        AddHandler cgi-script .pl
        Options +ExecCGI
    </Directory>


    <Directory /var/www/lrrh/log>
        Deny from all
    </Directory>

        <Location /perl-status>
        SetHandler perl-script
        PerlHandler Apache2::Status
    </Location>
</VirtualHost>

==============

Here is another conf file:

==============
<VirtualHost *>
    ServerAdmin webmaster@localhost
    ServerName wiki.dlugosz.com
    ServerAlias wiki.lamp4
    DocumentRoot /var/www/wiki/docroot
    ErrorLog    /var/www/wiki/logs/error_log
    CustomLog    /var/www/wiki/logs/access_log combined


    <Directory /var/www/wiki/docroot>
        AllowOverride None
        Order allow,deny
        allow from all
        AddHandler cgi-script .pl
        Options +ExecCGI
    </Directory>

    <Directory /var/www/wiki/log>
        Deny from all
    </Directory>

    <Location /perl-status>
        SetHandler perl-script
        PerlHandler Apache2::Status
    </Location>


</VirtualHost>

=============

This is Apache 2.2.3 running on Debian Etch 64-bit.
The permissions and owner/group on the respective docroot directories
are the same.
A minmal file "first.pl" copied right from the Apache manual, given
execute permission, is placed in the docroot directory.  It is copied to
the other.

One works, one doesn't.

Why?

I'm running this on a LAN clone of the server, so my test is using the
ServerAlias name for both.  The one that doesn't work will download the
file in the browser, rather than running it.

There is nothing in the global file (apache2.conf) that mentions either
of these, so the settings that are right for one should be right for the
other, right?


The log shows "200" when the file is downloaded (not run), and there is
nothing in the error log.
Is there any way to tell what Apache is thinking when it decides how to
handle a request?

TIA,
--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


Mime
View raw message