January 26, 2004
Enabling cgi in Mac OS X Personal Web Sharing
I wanted to try out pwyky, so I downloaded the script to my sparkly new iBook. I simply placed it in its own directory under my Sites folder and pointed Safari at it. But would it run? Would it heck. All I got in my browser was "You don't have permission to access ~andy47/wiki/index.cgi on this server" For the technical, it is an Apache 403 error. So I checked the permissions - on everything - several times and couldn't spot a problem. I thought that the problem lay in my Apache configuration, and that I needed to turn on CGI support in in directories other than /cgi-bin/.
After a few hours poking around, scratching my head and reading a large number of web pages I have figured it out.
To enable cgi scripts to run in your personal web site, which is the Sites folder in your home directory, you have to edit your personal httpd.conf file. Simply sign in as an administrator, cd to /etc/httpd/users and edit the file called <your username>.conf (in my case it is andy47.conf). Change the second line from;
Options Indexes Multiviews
to
Options Indexes Multiviews +ExecCGI
Easy. Then restart Apache. The easiest way to do this is open the "System Preferences ..." from the Apple menu, select the "Sharing" section and then stop and restart the "Personal Web Sharing" option. Or just reboot, but we never do that in Macintosh land ;-)
Posted by Andy Todd at January 26, 2004 09:40 PM
In my 10.3-client, there's nothing in /etc/httpd/users. What's yours look like?
Thanks!
Posted by: Jeffrey Chapman on January 31, 2004 09:39 PMYeeeahd, it's csool
Posted by: Numit on February 21, 2004 12:45 PM