On Thu, Feb 21, 2002 at 02:42:31PM -0000, IT Workflow - Terry
Honeyford wrote:
> but when I use Apache 1.3.22 I don't get as many $ENV's back from
> the server, in particular the one my script is looking for -
> ($ENV{remote_user})
In apache's httpd.conf, you should enable these lines:
LoadModule auth_module modules/mod_auth.so
AddModule mod_auth.c
and define an authentication realm for your cgi directory, like this:
<Directory /var/www/cgi-bin>
Options ExecCGI
Order allow,deny
Allow from all
AuthType Basic
AuthName "World Administration"
AuthUserFile /etc/httpd/conf/htpasswd
require valid-user
Satisfy all
</Directory>
In Perl, if you use CGI.pm, there's an attribute providing that value.
Just check if this little CGI-script works for you:
#!/usr/bin/perl -w
use CGI;
my $q=new CGI;
print $q->header,"You are user ",$q->remote_user;
Good luck!
--
Johannes Franken
Professional unix/network development
mailto:[EMAIL PROTECTED]
http://www.jfranken.de/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]