TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
execute cgi from ...com/~user/cgi-bin/hello
Hello,
I am trying to configure apache so that users can execute cgi from
/home/username/www/cgi-bin/. I've been testing with the following hello
world script which is from the Lincon Stein web:
#! /usr/bin/perl -w
use CGI ':standard';
print
header,
start_html('Example 1'),
h1('Hello World!'),
"Wow, I'm speaking HTML!",
hr,
end_html;
The script executes properly from www.mi-recordz.com/cgi-bin/hello
NameVirtualHost 209.134.131.41
<VirtualHost 209.134.131.41>
ServerAdmin rtp@mi-recordz.com
DocumentRoot /home/mi-r/www/html
ScriptAlias /cgi-bin /home/mi-r/www/cgi-bin
ServerName www.mi-recordz.com
ErrorLog logs/mi-recordz.com-error_log
TransferLog logs/mi-recordz.com-access_log
</VirtualHost>
However, the output from www.mi-recordz.com/~username/cgi-bin/hello is
just the text which makes up the script. The script is not executing.
access.conf:
<Directory /home/username/www/cgi-bin>
AllowOverride None
Options ExecCGI
</Directory>
httpd.conf:
ScriptAlias /cgi-bin/ /home/username/www/cgi-bin/
Directory and file permissions have basically been 755. Will the
ScriptAlias line need to be repeated for every user that has a cgi-bin?
Of course there are security issues with cgi and I appreciate any
insites on that.