CGI Perl
Emil Edeholt
emil at knmedical.se
Sun Sep 24 11:40:32 UTC 2006
Hi!
Thanks for the tips. I still can't get it to run. The error logs say
that cgi ain't allowed in that directory.
I've added this to the apache2.conf:
<Directory /home/www/html>
AllowOverride FileInfo AuthConfig Limit Options
Options Indexes SymLinksIfOwnerMatch IncludesNoExec
</Directory>
But it doesn't seem to help. I've also tried to Options +ExecCGI or
Options ExecCGI in a .htaccess file but the error logs say Options not
allowed here (I thought AllowOverride Options would make that possible?)
I've of course restarted apache when I've made changes in the .conf.
I also tried to add the content-type version, but that doesn't make any
difference. And i'm running this from a normal directory.
Any ideas? Gaah I didn't thought it would be so hard to get cgi up and
running, I must be missing something obvious?
Regards Emil
S. William Schulz wrote:
> A couple of things come to mind:
>
> First, though probably not the issue, is that when writing CGI scripts
> from Perl, you should send a content type first so that the browser
> knows what to do with the data, i.e. how to display it.
>
> #!/usr/bin/perl
> print "Content-Type: text/plain\n\n"; # Or text/html, whatever
> # Note the two newlines
> print "Test\n";
>
> Secondly, are you trying to run this from a regular directory on the
> server? Or one that is ScriptAliased, e.g. cgi-bin? What do the
> error logs from Apache say?
>
> SWS
>
>
More information about the ubuntu-users
mailing list