2
我想用mod_wsgi使用守護程序模式在Apache上部署2個django項目,但現在我只是在嘗試加載頁面時得到404。使用mod_wsgi在apache上部署多個django項目
這兩個站點都託管在同一臺服務器上,這兩個端口80上的網站,avalable的兩個條目下面:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName site1.com
ServerAlias www.site1.com
DocumentRoot /var/www/site1.com
ErrorLog /srv/www/site1.com/logs/error.log
CustomLog /srv/www/site1.com/logs/access.log combined
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName site2.org
ServerAlias www.site2.org
DocumentRoot /var/www/site2.org
ErrorLog /srv/www/site2.org/logs/error.log
CustomLog /srv/www/site2.org/logs/access.log combined
</VirtualHost>
而且在我的httpd.conf,
WSGIDaemonProcess site1.com python-path=/usr/local/www/site1/
WSGIProcessGroup site1.com
WSGIScriptAlias site1.com/blog /usr/local/www/site1/site1/wsgi.py
WSGIDaemonProcess site2.org python-path=/usr/local/www/site2/
WSGIProcessGroup site2.org
WSGIScriptAlias site2.org/ /usr/local/www/site2/site2/wsgi.py
<Directory /usr/local/www/site1/site1>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
<Directory /usr/local/www/site2/site2>
<Files wsgi.py>
Order deny, allow
Allow from all
</Files>
</Directory>
我從Django文檔中拿出了httpd.conf
的東西,但它仍然無法正常工作。 site1.com/blog給了我一個404,而site2.org給了我一個通用的Apache文件樹。我在這裏錯過了什麼?