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 used Homebrew to build and install mod_wsgi:

$ brew install mod_wsgi
==> Downloading http://modwsgi.googlecode.com/files/mod_wsgi-3.2.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/mod_wsgi/3.2 --disable-debug --disabl
==> make install
==> Caveats
NOTE: "brew install -v mod_wsgi" will fail! You must install
in non-verbose mode for this to succeed. Patches to fix this
are welcome (and should be sent upstream too.)

* You must manually edit /etc/apache2/httpd.conf to load
  /usr/local/Cellar/mod_wsgi/3.2/libexec/mod_wsgi.so

* On 10.5, you must run Apache in 32-bit mode:
  http://code.google.com/p/modwsgi/wiki/InstallationOnMacOSX
==> Summary
/usr/local/Cellar/mod_wsgi/3.2: 3 files, 344K, built in 18 seconds
$ 

I then added the following line to /etc/apache2/httpd.conf:

LoadModule mod_wsgi_module /usr/local/Cellar/mod_wsgi/3.2/libexec/mod_wsgi.so

And then I restarted Apache (with sudo apachectl restart). But then I get "can't connect to server" when I load http://localhost/, and I see the following in /private/var/log/apache2/error_log:

[Tue Jul 06 15:15:18 2010] [notice] caught SIGTERM, shutting down

If I comment out the LoadModule line and restart Apache again, it resumes working.

How do I properly "manually edit /etc/apache2/httpd.conf to load /usr/local/Cellar/mod_wsgi/3.2/libexec/mod_wsgi.so" as directed by the brew install note?

(I'm running Mac OS X 10.6.4.)

Update: I followed the instructions to force 32 bit execution at http://code.google.com/p/modwsgi/wiki/InstallationOnMacOSX, but still have the same problem.

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

Run:

sudo apachectl -t

and you will clearly see that you made an error in your configuration. Use:

LoadModule wsgi_module /usr/local/Cellar/mod_wsgi/3.2/libexec/mod_wsgi.so

as instructions should tell you. Ie., use 'wsgi_module' and not 'mod_wsgi_module'. See:

http://code.google.com/p/modwsgi/wiki/QuickInstallationGuide#Loading_Module_Into_Apache

If HomeBrew is telling you otherwise their instructions are wrong.

share|improve this answer
    
Thanks. I should have read code.google.com/p/modwsgi/wiki/QuickInstallationGuide more carefully. –  Daryl Spitzer Jul 6 '10 at 23:19
add comment

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.