CGI and Apache (newbie alert!)

CGI and Apache (newbie alert!)

Post by Ross Sla » Wed, 09 Aug 2000 04:00:00



[Mandrake 7.0-2, Apache 1.3.9]

My first attempt at running a CGI script (hit counter) on my pages results
in an error "client denied by server configuration" when the page url is
used.

However, when I use "http://localhost/cgi-bin/Count.cgi?df=sample.dat" the
counter displays just fine.

Any clues would be appreciated!

The httpd.conf is very near default, so rather than post a fairly large file
here if you can help please drop me a line and I'll attach it to you...

The part of the conf which seems most relevant is this:

---------------------------
<Directory /home/httpd/protected-cgi-bin>
        Options ExecCgi
        AllowOverride AuthConfig FileInfo Limit Options
# allow from .your_domain.com
order deny,allow
deny from all
allow from localhost
</Directory>
--------------------------

This is where the script is located. What I don't understand are the
implications of changing the "order", "deny from all" or "allow from localhost"
lines. Does changing/removing these compromise security?

Thanks for any help...

-Ross

--
----------------------------------------------------------------------
 <http://bunyip.apana.org.au/~rosco>                [ICQ No. 9391313]
               [change borg to org to reply by email]
----------------------------------------------------------------------

Chef, n.:
        Any cook who swears in French.

 
 
 

CGI and Apache (newbie alert!)

Post by Bill Mosele » Wed, 09 Aug 2000 04:00:00


On Tue, 8 Aug 2000 19:15:14 +1000 Ross Slade

Quote:> My first attempt at running a CGI script (hit counter) on my pages results
> in an error "client denied by server configuration" when the page url is
> used.

> However, when I use "http://localhost/cgi-bin/Count.cgi?df=sample.dat" the
> counter displays just fine.

> Any clues would be appreciated!

You posted the clues:

Quote:> ---------------------------
> <Directory /home/httpd/protected-cgi-bin>
>         Options ExecCgi
>         AllowOverride AuthConfig FileInfo Limit Options
> # allow from .your_domain.com
> order deny,allow

That says process the deny stuff before processing the allow stuff.

Quote:> deny from all

The deny stuff is "all" so everyone is first blocked.

Quote:> allow from localhost

Now, allow in only localhost.

Therefore, everyone is blocked except localhost.

This is what I'd do if you want full access in that directory.  But the
name of that directory is such that you might expect that directory to
be limited in access in some way (which it was).

 <Directory /home/httpd/protected-cgi-bin>
         Options ExecCgi
         AllowOverride AuthConfig FileInfo Limit Options
         Allow from all
 </Directory>

Maybe you should put your counter in /cgi-bin instead, if you have such
a directory.

--
Bill Moseley

 
 
 

1. Newbie alert: Setting up users with cgi-bin permissions (linux/apache)

I've got Apache 1.3 running on Redhat 7.1.  The installation went just
fine, and I can execute scripts from /usr/local/apache/cgi-bin.

My question is 2 fold:

     1)  What changes need to be made to .conf files to add a user
<joeblo> so that Apache looks at /home/joeblo/cgi-bin?

and

     2)  What permissions (chmod/chown) need to be set to /home/joeblo
and /home/joeblo/cgi-bin, as well as what are the permissions needed for
the actual scripts?

It seems like such a common question that arises, yet I've searched and
searched for some simple, straight-forward answers.  Yet no luck.  As I
said, I'm a newbie... so speak slowly  =)

Could somebody please provide a step-by-step answer?  I would be _most_
appreciative.

Thanks very much.

Jim

2. Sleep Command For Powerbook

3. ksh...newbie alert..newbie alert

4. IDE CD-Writer

5. newbie alert. apache installation

6. ATPG script for KATE

7. NEWBIE ALERT--Apache JServ on Solaris 8(x86)

8. mpeg encoding with sound

9. /cgi-bin/phf /cgi-bin/test-cgi /cgi-bin/handler

10. Absolute Newbie Question - CGI & Apache

11. CGI-Apache Newbie Ques.

12. Newbie Apache and CGI Problems

13. CGI & Apache - Perturbed Newbie - Please help