如何修复 FastCGI Pinax / Django 部署?

如何修复 FastCGI Pinax / Django 部署?

我正在运行 OSX Lion(发布在这里,因为这是一个特定于 Unix 的问题),并且正在尝试通过 FCGI 部署 Pinax 项目。我正在运行 FastCGI 守护进程:

$ 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

在我的 /etc/hosts 中我有:

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

<VirtualHost *:80>
    ServerAdmin [email protected]
    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>

在这台机器上我没有其他虚拟主机。

在 /Users/jonathan/orthodox/orthodox.fcgi 中,我有:

#!/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")

当我在浏览器中将其拉出时,它会挂起。

关于 FCGI Django 部署我可以纠正哪些问题有什么建议吗?

相关内容