Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm running OSX Lion (posted here because this is a Unix-specific question), and am trying to deploy a Pinax project via FCGI. I have the FastCGI daemon running:

$ ps wwaux | grep fcgi
jonathan          522   0.0  0.2  2480420   4216   ??  S    10:54AM   0:01.14 python manage.py runfcgi method=threaded host=127.0.0.1 port=1054
jonathan         6981   0.0  0.0  2434892    536 s001  R+    2:00PM   0:00.00 grep fcgi

In my /etc/hosts I have:

FastCGIExternalServer /Users/jonathan/orthodox/orthodox.fcgi -host 127.0.0.1:1054

<VirtualHost *:80>
    ServerAdmin cjshayward@pobox.com
    ServerName orthodox-network.com
    ServerAlias www.orthodox-network.com orthodox.haywardfamily.org
    DocumentRoot /Users/jonathan/orthodox
    Alias /media /Users/jonathan/orthodox/media
    RewriteEngine On
    RewriteRule ^/(media.*)$ /$1 [QSA,L,PT]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^/(.*)$ /orthodox.fcgi/$1 [QSA,L]
</VirtualHost>

<Directory /Users/jonathan/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
</Directory>

On this machine I have no other VirtualHosts.

In /Users/jonathan/orthodox/orthodox.fcgi, I have:

#!/usr/bin/python
import sys, os

# Add a custom Python path.
sys.path.insert(0, "/Users/jonathan")

# Switch to the directory of your project. (Optional.)
os.chdir("/Users/jonathan/orthodox")

# Set the DJANGO_SETTINGS_MODULE environment variable.
os.environ['DJANGO_SETTINGS_MODULE'] = "orthodox.settings"


from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="threaded", daemonize="false")

And when I pull it up in a browser it hangs.

Any advice about what I can correct to have an FCGI Django deployment?

share|improve this question
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.