|
Enabling CGI in Mac OS X with Apache
|
|
02-13-2010, 08:37 PM
Post: #1
|
|||
|
|||
|
Enabling CGI in Mac OS X with Apache
Is anyone experienced at enabling CGI using XAMPP for Mac OS X? I would like to use perl to execute scripts from cgi-bin/ -- for example, those contained in this bioinformatics book. However, after reading and rereading the on-line manuals, I continue to get:
Error 403 Access forbidden! You don't have permission to access the requested object. It is either read-protected or not readable by the server. Which tells me this is a permissions issue. I believe my permissions are correct: In cgi-bin/ -rwxr-xr-x 1 root admin 43 Jan 28 07:06 form_query.pl In the error_log: in error_log: Options ExecCGI is off in this directory/Applications/XAMPP/xamppfiles/cgi-bin/form_query.pl So, I go to httpd.conf to turn ExecCGI on: Lines from httpd.conf file: ScriptAliasMatch ^/cgi-bin/((?!(?i:webobjects)).*$) "/Library/WebServe +r/CGI-Executables/$1" AddHandler cgi-script .cgi .pl # "/Library/WebServer/CGI-Executables" should be changed to whatever y +our ScriptAliased # CGI directory exists, if you have that configured. # <Directory "/Library/WebServer/CGI-Executables"> AllowOverride None Options ExecCGI Order allow,deny Allow from all </Directory> That did not work, so I tried enabling CGI in the directory that my cgi executable files are in: <Directory "/Applications/XAMPP/xamppfiles/cgi-bin/"> AllowOverride None Options Indexes FollowSymLinks MultiViews ExecCGI Order allow,deny Allow from all </Directory> But still the 403 error persists Could the problem be here? When calling ls -l in the XAMPP directory: drwxr-xr-x 3 user admin 102 Aug 16 07:35 XAMPP Control.app lrwxr-xr-x 1 user admin 18 Sep 27 09:49 cgi-bin -> xamppfiles/cgi-bin lrwxr-xr-x@ 1 user admin 14 Sep 27 09:49 etc -> xamppfiles/etc lrwxr-xr-x 1 user admin 17 Sep 27 09:49 htdocs -> xamppfiles/htdocs lrwxr-xr-x@ 1 user admin 15 Sep 27 09:49 logs -> xamppfiles/logs drwxr-xr-x@ 23 root admin 782 Aug 16 07:36 xamppfiles Is there a problem with the Symlinks? Any help would be very much appreciated. Has anyone else had this problem, and successfully solved it? I am running Mac OS X 10.5.7, with XAMPP for Mac OS X (Apache 2.0, Perl5, mod_perl 2.0.4) Thank you! |
|||
|
02-17-2010, 09:17 AM
Post: #2
|
|||
|
|||
|
RE: Enabling CGI in Mac OS X with Apache
Hi,
From the information you've provided - this looks like it should work... ![]() Can you post your entire httpd.conf and an 'ln -s' of your cgi directory please and hopefully we can figure something out from there. Cheers, Daz |
|||
|
02-21-2010, 08:14 PM
Post: #3
|
|||
|
|||
RE: Enabling CGI in Mac OS X with Apache
(02-17-2010 09:17 AM)Daz Wrote: Hi, Daz, The solution was simple - if you install XAMPP on a Mac you will then have 2 versions of Apache, and therefore 2 httpd.conf files. You have to edit the correct file. When I realized this I made the changes to the XAMPP version of httpd.conf, CGI executes correctly. Sorry to bother the forum with this issue -- but hopefully it will save time for someone. Thanks again, Shuraski |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)

Search
Member List
Help




