Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
Are you sure it is fully contained in that directory and does not reference elements outside that directory? –  mdpc Jun 11 '12 at 18:08
    
yep! The only thing it does is print out 'hello world' –  jessh Jun 11 '12 at 18:43

1 Answer 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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.