【发布时间】:2016-07-07 05:50:04
【问题描述】:
在绑定中,我使用 CNAME 作为从 old.domain.com 到 new.domain.com 的重定向器 old.domain 也是我删除的虚拟主机 每个虚拟主机都有到 https 的 http 重定向,但问题是在 webbrowser 中输入旧地址时,即使 dig/nslookup 看到 dns cname,我也会重定向到 diff.domain.com。 当我禁用那个虚拟主机时,下一个 diff2.domain.com 会被重定向
<VirtualHost ip:80>
ServerName diff.domain.com
Redirect permanent / https://diff.domain.com/
</VirtualHost>
<IFModule mod_ssl.c>
<VirtualHost ip:443>
ServerAdmin webmaster@domain.com
ServerName diff.domain.com:443
DocumentRoot /var/www/diff/web
<Directory "/var/www/diff/web">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
ErrorLog /var/www/diff/logs/error.log
CustomLog /var/www/diff/logs/access.log combined
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/diff/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/diff/privkey.pem
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
# MSIE 7 and newer should be able to use keepalive
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
<IfModule mod_fastcgi.c>
AddType application/x-httpd-fastphp5 .php
Action application/x-httpd-fastphp5 /php5-fcgi
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi_diff
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi_diff -socket /var/run/php5-fpm_diff.sock -pass-header Authorization
</IfModule>
</VirtualHost>
</IFModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
我使用这个 conf 来代替其他虚拟主机,但看起来这里某处存在错误/错误
【问题讨论】: