英文:
Virtual host in Windows 10 with xampp and laravel
问题
我想创建虚拟主机"mail.test",但我收到以下错误:
> 请求的 URL 无法检索
在尝试检索 URL 时出现以下错误:http://mail.test/
>
> 目前无法转发此请求。
>
> 此请求无法转发到源服务器或任何上级缓存。
>
> 一些可能的问题包括:
>
> 用于访问此域的源服务器的互联网连接可能已断开。
所有配置的上级缓存当前可能无法访问。
管理员可能不允许此缓存直接连接到源服务器。
以下是我的配置:
C:\Windows\System32\drivers\etc\hosts
127.0.0.1 mail.test
C:\xampp\apache\conf\extra\httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "C:/xampp/htdocs/laravel/mail/public"
ServerName mail.test
ServerAlias mail.test
</VirtualHost>
在 Chrome 浏览器中,我访问"http://mail.test/"。
英文:
I want to make virtual host "mail.test" but i get this error :
>The requested URL could not be retrieved
The following error was encountered while trying to retrieve the URL: http://mail.test/
>
>Unable to forward this request at this time.
>
>This request could not be forwarded to the origin server or to any parent caches.
>
>Some possible problems are:
>
>An Internet connection needed to access this domains origin servers may be down.
All configured parent caches may be currently unreachable.
The administrator may not allow this cache to make direct connections to origin servers.
these are my configurations :
C:\Windows\System32\drivers\etc\hosts
127.0.0.1 mail.test
C:\xampp\apache\conf\extra\httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "C:/xampp/htdocs/laravel/mail/public"
ServerName mail.test
ServerAlias mail.test
</VirtualHost>
In chrome browser I go to "http://mail.test/"
答案1
得分: 0
我重置了我的笔记本电脑,一切都正常!
英文:
I reset my Laptop and everything goes OK!
答案2
得分: 0
重新启动 Xampp 以获取新更改。
英文:
After editing virtual host files and configuration it is a must to restart your Xampp to get the new changes
答案3
得分: 0
你应该尝试使用Laragon来处理这些类型的事情,它具有许多功能,非常容易使用。
英文:
You should try Laragon for these type of things, it does really easy with lots of features.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论