我使用Apache配置示例圆形多维数据集在mail.mydomain.com
子域上设置了roundcube。现在,当我尝试通过https访问根域时,它会显示圆形立方体界面(不会重定向到子域)。
# Apache2 vhost configuration sample for Roundcube
# https://linode.com/docs/email/clients/installing-roundcube-on-ubuntu-14-04/
<VirtualHost *:80>
# Virtual host configuration + information (replicate changes to *:443 below)
ServerAdmin tehnic@luckypizza.ro
ServerName mail.luckypizza.ro
ServerAlias mail.laiancu.ro
DocumentRoot /var/www/roundcube
ErrorLog /var/log/apache2/webmail/error.log
CustomLog /var/log/apache2/webmail/access.log combined
# Permanently redirect all HTTP requests to HTTPS
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R=301,L]
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
# Virtual host configuration + information (replicate changes to *:80 above)
ServerAdmin tehnic@mydomain.ro
ServerName mail.mydomain.ro
ServerAlias mail.myotherdomain.ro
DocumentRoot /var/www/roundcube
# ErrorLog /var/log/apache2/webmail/error.log
# CustomLog /var/log/apache2/webmail/access.log combined
# SSL certificate + engine configuration
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/mail.mydomain.ro/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mail.mydomain.ro/privkey.pem
# Roundcube directory permissions + restrictions
<Directory /var/www/roundcube>
Options -Indexes
AllowOverride All
</Directory>
<Directory /var/www/roundcube/config>
Order Deny,Allow
Deny from All
</Directory>
<Directory /var/www/roundcube/temp>
Order Deny,Allow
Deny from All
</Directory>
<Directory /var/www/roundcube/logs>
Order Deny,Allow
Deny from All
</Directory>
</VirtualHost>
</IfModule>
我已经为root网站复制了这个配置,如下所示:
<VirtualHost *:80>
# Virtual host configuration + information (replicate changes to *:443 below)
ServerAdmin tehnic@mydomain.ro
ServerName mydomain.ro
ServerAlias www.mydomain.ro
DocumentRoot /var/www/mydomain/root/public
ErrorLog /var/log/apache2/lucky_error.log
CustomLog /var/log/apache2/lucky_access.log combined
# Permanently redirect all HTTP requests to HTTPS
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R=301,L]
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
# Virtual host configuration + information (replicate changes to *:80 above)
ServerAdmin tehnic@mydomain.ro
ServerName mydomain.ro
ServerAlias www.mydomain.ro
DocumentRoot /var/www/mydomain/root/public
# ErrorLog /var/log/apache2/lucky_error.log
# CustomLog /var/log/apache2/lucky_access.log combined
# SSL certificate + engine configuration
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/mydomain.ro/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mydomain.ro/privkey.pem
# Roundcube directory permissions + restrictions
<Directory /var/www/mydomain/root/public>
Options -Indexes
AllowOverride All
</Directory>
</VirtualHost>
</IfModule>
配置似乎有什么问题?