Apache - ScriptAlias for cgi.

Apache - ScriptAlias for cgi.

Post by Doug Laidla » Wed, 12 Mar 2003 10:28:44



I am running Mandrake 9.0 with Apache 1,3.

I am unable to access cgi scripts in my cgi-bin directory
(/var/www/cgi-bin).  My commonhttpd.conf has:

ScriptAlias /cgi-bin/ /var/www/cgi-bin/
ScriptAlias /protected-cgi-bin/ /var/www/protected-cgi-bin/

As I read the documentation, that should be sufficient, but it isn't.
I get a "you don't have permission" message.

Any suggestions appreciated.

Doug.

--
"For every human problem, there is a neat, simple solution; and it is always
wrong."

    - H. L. Mencken

 
 
 

Apache - ScriptAlias for cgi.

Post by Doug Laidla » Wed, 12 Mar 2003 11:39:22


Thanks for replying so quickly.  Yes, I have

<Directory /var/www/cgi-bin>
    AllowOverride All
    Options ExecCGI
</Directory>

I have been able to get around the problem by specific entries, e.g.

<Directory /var/www/html/gedview>
    AllowOverride All
    Options ExecCGI
</Directory>

and by putting the cgi script in the given directory, but this usually means modifying supplied scripts, etc.

The cgi-bin directory seems to have the same owner (root) and the same
permissions (755) as all the others.

Doug.



>> I am running Mandrake 9.0 with Apache 1,3.

>> I am unable to access cgi scripts in my cgi-bin directory
>> (/var/www/cgi-bin).  My commonhttpd.conf has:

>> ScriptAlias /cgi-bin/ /var/www/cgi-bin/
>> ScriptAlias /protected-cgi-bin/ /var/www/protected-cgi-bin/

>> As I read the documentation, that should be sufficient, but it isn't.
>> I get a "you don't have permission" message.

>> Any suggestions appreciated.

> Do you have a <Directory "/var/www/cgi-bin"> block which gives permissions
> to access that area (Allow from ...)? If not, and your default for a
> higher level (like <Directory "/">) is to deny, you won't be able to
> access cgi-bin.

--
"For every human problem, there is a neat, simple solution; and it is always
wrong."

    - H. L. Mencken

 
 
 

1. Apache 1.3.3 CGI ScriptAlias for ~

Is it possible to ScriptAlias directories under ~ accounts?

UserDirs htdocs
ScriptAlias or ScriptAliasMatch ??????

<VirtualHost 10.0.0.1>
User #10000
ServerName 10.0.0.1
DocumentRoot /home/0/1/htdocs
ScriptAlias /cgi-local/ /home/0/1/htdocs/cgi-local/
</VirtualHost>
<VirtualHost 10.0.0.2>
User #10001
ServerName 10.0.0.2
DocumentRoot /home/0/2/htdocs
ScriptAlias /cgi-local/ /home/0/2/htdocs/cgi-local/
</VirtualHost>

So that:
http://www.mainserver.com/~user1/cgi-local will execute the scripts in their
local cgi directory instead of just displaying them in the browser.

Directory Structure:
/home/0/1/htdocs/cgi-local
/home/0/2/htdocs/cgi-local

Password File:
user1:*:10000:500:Web User:/home/0/1/htdocs:/bin/false
user2:*:10001:500:Web User:/home/0/2/htdocs:/bin/false

I know this is easy to do for a virtual host but I have the need for the
users to be able to access their virtual site through the secure server for
ssl transactions and still execute their scripts out of their local cgi
directory.  Currently it just display the scripts because the virtual host
scriptalias doesn't get applied.

Any help would be greatly appreciated,
John Hamlik

2. Problem installing new Nvidia driver on RH7.3

3. Apache 1.3.3 - multiple cgi-bin/ dir's without ScriptAlias?

4. locked pts/x

5. Apache CGI/ScriptAlias problem...

6. Hitachi 3600?

7. Apache won't let me use CGI scripts outside of ScriptAliased dirs.

8. Paging in SunOS

9. Apache cgi-bin newbie problem, ScriptAlias?

10. Apache ScriptAlias: /cgi-bin <searchlist>

11. apache: multiple ScriptAlias cgi's aren't working, please help

12. Action directive won't run cgi in non ScriptAlias'ed dir?

13. ScriptAlias & #include of CGI scripts