【发布时间】:2019-10-08 16:48:37
【问题描述】:
所以我安装了 django 作为我的主目录
django.conf(在 Apache2 中):
Alias /robots.txt /home/django/NAME/static/robots.txt
Alias /favicon.ico /home/django/NAME/static/favicon.ico
Alias /media/ /home/django/NAME/media/
Alias /static/ /home/django/NAME/static/
<Directory /home/django/NAME/static>
Require all granted
</Directory>
<Directory /home/django/NAME/media>
Require all granted
</Directory>
WSGIScriptAlias / /home/django/NAME/NAME/wsgi.py
WSGIPythonHome /home/django/NAME/venv
WSGIPythonPath /home/django/NAME
<Directory /home/django/NAME/NAME>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
现在我想启用 roundcube 作为 mail.NAME.net 这是我的配置:
<VirtualHost *:80>
ServerName mail.NAME.net
ServerAdmin admin@NAME.net
DocumentRoot /var/www/html/roundcube
ErrorLog ${APACHE_LOG_DIR}/roundcube_error.log
CustomLog ${APACHE_LOG_DIR}/roundcube_access.log combined
<Directory /var/www/html/roundcube>
Options -Indexes
AllowOverride All
Order allow,deny
allow from all
</Directory>
RewriteEngine on
RewriteCond %{SERVER_NAME} =mail.keyinator.net
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
禁用 Django 后一切正常。启用它时,我在 mail.keyinator.net 上收到 400 Bad Request 错误
所以我的问题是:如何在使用 django 时使我的子站点 mail.keyinator.net 可用?
【问题讨论】:
-
djanAlias???错字? -
是的,对不起。这是一个错字。我在服务器上更正了它,但没想到它也在这里。但是错误仍然存在