我有一个 Django 项目,我需要将它安装在我的 url 的两个不同子目录中,并且我需要在 / 处运行 Wordpress。所以:
*.example.com - WordPress
*.example.com/studio - django
*.example.com/accounts - django
这是我到目前为止的 httpd.conf:
<VirtualHost *:80>
ServerName wildcard.localhost
ServerAlias *.localhost
AddType application/x-httpd-php .php
DocumentRoot /var/empty
Alias /site_media/ /home/zach/projects/python/myproject/static/
Alias /media/ /home/zach/projects/python/myproject/env/lib/python2.6/site-packages/django/contrib/admin/media/
Alias / /home/zach/projects/python/myproject/wordpress/
WSGIScriptAlias /accounts /home/zach/projects/python/myproject/app/privio.wsgi
WSGIScriptAlias /studio /home/zach/projects/python/myproject/app/privio.wsgi
<Directory /home/zach/projects/python/myproject/app>
Order allow,deny
Allow from all
</Directory>
<Directory /home/zach/projects/python/myproject/wordpress>
Order allow,deny
Allow from all
</Directory>
在我为 WordPress 添加配置之前,Django 应用程序运行良好。但是通过这个新设置,我可以看到 WordPress 安装在 /,但是 Django 应用程序没有得到服务。我在 Apache 配置方面有点菜鸟 - 我错过了什么?