0

I'm trying to run a python cgi script on my Mac's web server. Everytime I visit the file @ localhost/site.py I get a 403 forbidden error.

I'm looking in my Apache's error log, and it says:

[Mon Jun 11 09:52:42 2012] [error] [client ::1] Options ExecCGI is off in this directory: /Users/<username>/Sites/site.py

I've changed my httpd.conf file so that my document root is /Users//Sites

In my user's .conf file, I have the following:

<Directory "/Users/<username>/Sites/">
  Options All
  AllowOverride All
  Order allow,deny
  Allow from all
  AddHandler cgi-script .py
</Directory>

Why is it telling me ExecCGI is off, when I've allowed all options in my user's .conf file?

jshawl
  • 297
  • 2
  • 13

1 Answers1

1

Do you use mac's built-in apache2, or package like XAMPP? I found XAMPP doesn't use user.conf, one have to edit /Applications/XAMPP/etc/httpd.conf.

Another things is the change of user.conf take effect AFTER apache restart.

高宏任
  • 11
  • 2