ubuntu 正在将所有虚拟主机重定向到 https?
ubuntu is redirecting all virtual hosts to https?
我在 Ubuntu 上创建了一个虚拟主机,并将其重定向到 https。
和虚拟主机不工作。
这里是虚拟主机设置:
<VirtualHost *:80>
ServerName xserver.dev
DocumentRoot /var/www/xserver/public
SetEnv APPLICATION_ENV "development"
<Directory /var/www/xserver/public>
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/xx-error.log
CustomLog ${APACHE_LOG_DIR}/xx-access.log combined
</VirtualHost>
我已将其添加到 /etc/hosts
127.0.0.1 xserver.dev
当我尝试访问 xserver.dev
它将我重定向到 https://xserver.dev 和空白页
我也无法访问文件文件。在给定路径上可用
.dev
是由Google运营的top-level域名。
由于 Chrome 63 和 Firefox 59,浏览器将 .dev
URL 重定向到 HTTPS。
建议使用 .test
,自 1999 年起由互联网工程任务组保留 (RFC2606)。
将您的虚拟主机更改为:
<VirtualHost *:80>
ServerName xserver.test
DocumentRoot /var/www/xserver/public
SetEnv APPLICATION_ENV "development"
<Directory /var/www/xserver/public>
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/xx-error.log
CustomLog ${APACHE_LOG_DIR}/xx-access.log combined
</VirtualHost>
你的 /etc/hosts
到:
127.0.0.1 xserver.test
然后,访问您的网站:http://xserver.test
我在 Ubuntu 上创建了一个虚拟主机,并将其重定向到 https。 和虚拟主机不工作。
这里是虚拟主机设置:
<VirtualHost *:80>
ServerName xserver.dev
DocumentRoot /var/www/xserver/public
SetEnv APPLICATION_ENV "development"
<Directory /var/www/xserver/public>
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/xx-error.log
CustomLog ${APACHE_LOG_DIR}/xx-access.log combined
</VirtualHost>
我已将其添加到 /etc/hosts 127.0.0.1 xserver.dev
当我尝试访问 xserver.dev 它将我重定向到 https://xserver.dev 和空白页
我也无法访问文件文件。在给定路径上可用
.dev
是由Google运营的top-level域名。
由于 Chrome 63 和 Firefox 59,浏览器将 .dev
URL 重定向到 HTTPS。
建议使用 .test
,自 1999 年起由互联网工程任务组保留 (RFC2606)。
将您的虚拟主机更改为:
<VirtualHost *:80>
ServerName xserver.test
DocumentRoot /var/www/xserver/public
SetEnv APPLICATION_ENV "development"
<Directory /var/www/xserver/public>
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/xx-error.log
CustomLog ${APACHE_LOG_DIR}/xx-access.log combined
</VirtualHost>
你的 /etc/hosts
到:
127.0.0.1 xserver.test
然后,访问您的网站:http://xserver.test