Hi all. I'm busy setting up to run (okay, play with) CGIs. So for, not so great.

According to the Apache error logs, I'm connecting okay, but something seems to
be off.i've been reading up on the config issues, and I've worked thru some of
them, but frankly I'm out of my element, and concerned about munging up httpd.conf
so badly I'll be sent away.


The script..
        #!/usr/bin/perl -w
        print "Content-type: text/html\n\n";
        print "<h2>Hello, World!</h2>\n";

...shows up in safari with the script text, but with "Hello World" in the header
font style!


        !/usr/bin/perl -w  print "Content-type: text/html\n\n";  print "

        Hello, World!
        \n";

These are (AFAIK) the relevant httpd parts. Note that I was following a tutorial
on the O'reilly site, and one here <http://www.cgi101.com/learn/connect/mac.html>
and made the most progress with using my own home directory (as opposed to
/Lib/./CGI-Exe). (I'm not sure what makes the most sense, just for
at-home development. I'd imagine the more real-world setup is better)


<Directory /Users/mike/Sites>
    AllowOverride FileInfo AuthConfig Limit
    Options MultiViews Indexes SymLinksIfOwnerMatch Includes ExecCGI
    DirectoryIndex index.html index.cgi
    <Limit GET POST OPTIONS PROPFIND>
        Order allow,deny
        Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS PROPFIND>
        Order deny,allow
        Deny from all
    </LimitExcept>
</Directory>

        and...

    # To use CGI scripts:
    #
    #AddHandler cgi-script .cgi

    #
    # To use server-parsed HTML files
    #
    #AddType text/html .shtml
    #AddHandler server-parsed .html

The log says this (which to my eyes looks better than what I've seen before

[Wed Mar 9 16:51:37 2005] [notice] Apache/1.3.33 (Darwin) PHP/4.3.2 configured -- resuming normal operations
[Wed Mar 9 16:51:37 2005] [notice] Accept mutex: flock (Default: flock)


Yikes! This is long!

Mike



Reply via email to