Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apache setup is hard on OS X (and *very* hard under el capitan) #81

Open
bmschmidt opened this issue Aug 4, 2015 · 2 comments
Open

Comments

@bmschmidt
Copy link
Member

Some things that bookworm config apache could do, but mostly noted here for troubleshooting OS x installations.

  1. Ensure that /usr/bin/env python returns a good version of python py putting this into the EnvironmentVariables dict of /System/Library/LaunchDaemons/org.apache.httpd.plist
<key>EnvironmentVariables</key>
<dict>
   <key>PATH</key>
   <string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin:/usr/local/bin</string>
</dict>
  1. Possibly not necessary, though I've had to do it after running setup.py: allow apache to write to a python eggs directory.
mkdir /Library/WebServer/.python-eggs
chown -u _www /Library/WebServer/.python-eggs
  1. In /etc/apache2/httpd.conf:

    • Uncomment the line LoadModule cgi_module libexec/apache2/mod_cgi.so
    • Something like the following to allow python scripts to run themselves.
    <Directory "/Library/WebServer/CGI-Executables">
    AllowOverride None
    Options ExecCGI
    AddHandler cgi-script .cgi .pl .tcl .py
    Order allow,deny
    Allow from all
    Require all granted
    </Directory>
@bmschmidt bmschmidt changed the title Apache setup is hard on OS X Apache setup is hard on OS X (and *very* hard under el capitan) Dec 3, 2015
@bmschmidt
Copy link
Member Author

Under el capitan, this has become even worse.

/System/Library/LaunchDaemons/org.apache.httpd.plist is in one of the directories that Apple no longer lets even the root user write to. Some possible solution here.

What I've done is simply reboot without system integrity protection using this method, and then edited the plist file.

@kaspesla
Copy link

kaspesla commented Nov 9, 2016

Thank you for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants