我正在嘗試創建一個小型django站點並使用iRedMail進行電子郵件。我首先安裝了iRedMail,並確保它可以正常工作。我可以同時訪問www.domain.com/iredadmin和www.domain.com/mail並使其完美工作。我的下一步是安裝我的django站點並配置Apache。不幸的是,這導致我的django網站嘗試處理/郵件/和/ iredadmin /。我一直在忙着配置幾個小時,不知道該怎麼做。具體設置如下:在同一臺服務器上使用帶有Django站點的iRedMail
apache2.conf:啓用站點-
# Defaults...
WSGIPythonPath /path/to/website.com/website
/website.com:
<VirtualHost *:80>
ServerName website.in
ServerAlias www.website.in
ErrorLog ${APACHE_LOG_DIR}/error.log
Alias /static /path/to/website.com/website/static
Alias /media /path/to/website.com/website/media
Alias /mail /usr/share/apache2/roundcubemail/
Alias /admin /usr/share/apache2/iredadmin/
<Directory /usr/share/apache2/roundcubemail/>
Order allow,deny
Allow from all
</Directory>
WSGIScriptAlias//path/to/website.com/website/website.wsgi
<Location "/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE website.settings
PythonDebug Off
PythonPath "['/path/to/website.com/website/']+sys.path"
</Location>
<Directory /path/to/website.com/website>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
<Directory /path/to/website.com/website/static>
Order allow,deny
Allow from all
</Directory>
<Location /static/>
SetHandler None
</Location>
<Directory /path/to/website.com/website/media>
Order allow,deny
Allow from all
</Directory>
<Location /media/>
SetHandler None
</Location>
</VirtualHost>
Django的網站顯示細膩,雖然我已經越來越內部服務器錯誤。