
我正在嘗試使用 apache mod-wsgi 運行 django 站點,並以 nginx 作為前端來反向代理到 apache。
在我的 Apache ports.conf 檔案中:
NameVirtualHost 192.168.0.1:7000
Listen 192.168.0.1:7000
<VirtualHost 192.168.0.1:7000>
DocumentRoot /var/apps/example/
ServerName example.com
WSGIDaemonProcess example
WSGIProcessGroup example
Alias /m/ /var/apps/example/forum/skins/
Alias /upfiles/ /var/apps/example/forum/upfiles/
<Directory /var/apps/example/forum/skins>
Order deny,allow
Allow from all
</Directory>
WSGIScriptAlias / /var/apps/example/django.wsgi
</VirtualHost>
在我的 nginx 設定中:
server {
listen 80;
server_name example.com;
location / {
include /usr/local/nginx/conf/proxy.conf;
proxy_pass http://192.168.0.1:7000;
proxy_redirect default;
root /var/apps/example/forum/skins/;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
重新啟動 apache 和 nginx 後,沒有任何效果,example.com 只是掛起或在我的 /var/www/ 資料夾中提供 index.html。
如果有任何建議能夠為我指明正確的方向,我將不勝感激。我嘗試了網上的一些教程,但沒有效果。
答案1
我偷偷地懷疑問題可能是/root/.python-eggs
——我想你可能想在以下位置找到蟒蛇蛋/var/www/...
;)