Apache, htaccess & cgi

Apache, htaccess & cgi

Post by S. William Schu » Sun, 01 Oct 1995 04:00:00



Greetings!

I am using Apache on a sun server.  I have the ability to use cgi
scripts, which works fine until I installed a .htaccess file to allow
server parsed pages.

The server will now parse all .shtml pages, but will not allow me to
run cgi scripts.  I get the usual You do not have access to that file
error.

Is there a line I can place in the htaccess file so that, in addition
to allowing server parsed html it will allow cgi scripts to run?

Thanks,

S. William Schulz

 
 
 

Apache, htaccess & cgi

Post by Rob Hartil » Mon, 02 Oct 1995 04:00:00



Quote:>Greetings!

>I am using Apache on a sun server.  I have the ability to use cgi
>scripts, which works fine until I installed a .htaccess file to allow
>server parsed pages.

presumably you added

Allow Includes

You should also add whatever other allow types you need

Allow Includes ExecCGI

I think should do the trick.

 
 
 

Apache, htaccess & cgi

Post by Robert S. Th » Mon, 02 Oct 1995 04:00:00




Quote:>Allow Includes ExecCGI

Errrrmmm... that's "Options", as in:

  Options Includes ExecCGI

(or just

  Options All

if you can stand to have directory-indexing turned on).

rst

 
 
 

Apache, htaccess & cgi

Post by Robert Nichols » Tue, 03 Oct 1995 04:00:00


>Greetings!
>I am using Apache on a sun server.  I have the ability to use cgi
>scripts, which works fine until I installed a .htaccess file to allow
>server parsed pages.
>The server will now parse all .shtml pages, but will not allow me to
>run cgi scripts.  I get the usual You do not have access to that file
>error.
>Is there a line I can place in the htaccess file so that, in addition
>to allowing server parsed html it will allow cgi scripts to run?
>Thanks,
>S. William Schulz


I'd guess from this that you have Allow None specified in your global
access conf?

--
              The views and opinions expressed in this article
              are those of the poster and not his employer.

 
 
 

Apache, htaccess & cgi

Post by S. William Schu » Wed, 04 Oct 1995 04:00:00



>>Greetings!

>I'd guess from this that you have Allow None specified in your global
>access conf?

I inserted the ExecCGI and it works fine.  Thanks to all who sent
responses.

Since I am a user on the system, I do not have any control over the
systemwide settings.  Does the above statement assum sysop status, or
is there some additional file I can create in the directory?

While on the subject, now that includes and cgi scripts work, the
server will not load the index.html page.  Is there yet another
command for that?

Thanks again,

S. William Schulz

 
 
 

Apache, htaccess & cgi

Post by Rob Hartil » Wed, 04 Oct 1995 04:00:00



Quote:>While on the subject, now that includes and cgi scripts work, the
>server will not load the index.html page.  Is there yet another
>command for that?

There was a bug in an earlier Apache that broke "DirectoryIndex".
You should be picking up the default DirectoryIndex (index.html usually),
if it is something else and you want index.html in your dir, add
DirectoryIndex index.html to .htaccess
If that fails, it would suggest you're running the old and broken version.

rob
--
http://nqcd.lanl.gov/~hartill/

 
 
 

1. Apache: .htaccess & cgi scripts

I'm trying to setup a directory in Apache (1.1.3 on RedHat Linux) so
that I can control access to certain directories via IP address and
other's via a username/password.  So far I've got it all working execpt
for one part.  Here's what I've got so far:

/home/httpd/cgi-bin  <--IP protected
/home/httpd/html     <--IP protected
/home/httpd/html/page/  <--username/password protected

What I need is to get a cgi script to exectute off of
/home/httpd/html/page/  (so that it is password protected)

I've got the following in my access.conf:

<Directory /home/httpd/html/page>
Options FollowSymLinks ExecCGI
AllowOverride AuthConfig
order deny,allow
allow from all
</Directory>      

but when I have a form that does a GET on a cgi script in the directory
it fails.  If I put the cgi script in the /home/httpd/cgi-bin it works,
but is only accessable to certain IP's (which doesn't work, 'cuz we've
got a number of scripts that need to be protected via IP lookup.)

I've tried using symlinks (both ways) but that doesn't work.

What am I doing wrong?

Thanks!

Please cc: me in any replies to the newsgroup.

--

Network Engineer                         |  Voice: 415.237.0311 x252
Vicinity Corp.  http://www.vicinity.com  |  Fax:   415.237.0305

2. Solaris, Red Hat, and NIS (Oh my!)

3. .htaccess for Apache & cgi generated forms

4. Running X remotely...?? Howto..?

5. Apache && CGI && uid || back to cern?

6. 3rd Party application list 3.2.5 -> 4.1.4

7. .htaccess & Apache & duplicate file names.

8. X and kernel securelevel

9. .htaccess with cgi forms on Apache

10. Apache executing cgi-scripts inside .htaccess protected directories

11. apache: CGI-scripts using PATH_TRANSLATED, .htaccess

12. Apache and .htaccess in the CGI-bin

13. Apache CGI, .htaccess, and DirectoryIndex interaction?