[plug] Apache Problems
Christian
christian at global.net.au
Mon Feb 28 13:57:27 WST 2000
Hi all,
I'm trying to work out how I can get the username provided through HTTP
authentication and pass it to a CGI. I figure it's part of the headers
of the environment or something so I'm trying to run the standard
test-env shell script from a directory that has a .htaccess file (it
appears that .htaccess files are ignored in the cgi-bin directory) so I
can work it out.
Unfortunately I can't seem to get Apache to execute CGI scripts in a
directory other than the ScriptAlias. If I configure:
<Directory /home/staff/again/public_html/>
AddHandler cgi-script cgi
Options +ExecCGI
allow from all
</Directory>
My browser returns:
Forbidden
You don't have permission to access /~again/test-env.cgi on this server.
And the error log says:
[Mon Feb 28 13:51:34 2000] [error] [client 203.153.224.45] Options
ExecCGI is off in this directory:
/home/staff/again/public_html/test-env.cgi
If I move it to, say /var/www/test (where /var/www is the DocumentRoot)
and add a .htaccess file:
AuthName Radius
AuthType Basic
Options ExecCGI
AddHandler cgi-script cgi
require user again
Then Apache just gives me a copy of the script...
Can anyone suggest a) how to find out the HTTP username from a CGI
script and/or b) Why Apache is not doing what I want?
Thanks,
Christian.
More information about the plug
mailing list