【发布时间】:2019-04-19 10:34:53
【问题描述】:
我已通过转到 C:\xampp\apache\conf\extra\httpd-vhosts.conf 创建了虚拟主机 然后我写了这个:
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/basicwebsite/public"
ServerName basicwebsite.dev
</VirtualHost>
然后我转到 C:\Windows\System32\drivers\etc 中的 hosts 文件并写下:
127.0.0.1 localhost
127.0.0.1 basicwebsite.dev
然后我停止了 apache 服务器并再次启动它,通常它应该已经打开了我们正在制作的 laravel 应用程序,但是当我打开浏览器并输入 basicwebsite.dev 时,它在我的浏览器中显示错误它表明了这一点 Screenshot of my page when i type the link
它说此站点无法提供安全连接。 但它不应该显示这个,它应该显示页面。 在这里做什么?
【问题讨论】:
-
不要在 Chrome 中使用
dev域,而是使用test或local。 -
感谢正确。感谢您的帮助
标签: php laravel xampp virtualhost