我无法访问我的 xampp 服务器为其他项目而不是 laravel 项目......


I Can not access my xampp sever for others project instead of laravel project....!

我正在学习拉拉维尔框架。我已经虚拟地安装了它并配置了这个 C:''Windows''System32''drivers''etc''hosts Windows 系统文件。更改此文件后,Laravel项目运行良好,但我遇到其他项目的问题,它们无法正常工作,我收到此错误消息,例如

"哎呀,好像出事了。"

我已经在系统文件上配置了虚拟主机,如下所示

# localhost name resolution is handled within DNS itself.
    127.0.0.1       localhost
#   ::1             localhost
    127.0.0.1       laravel.test1

有没有人遇到这个问题,或者请向我建议一些我可以解决这个问题的东西。还是我在这里犯了什么可怕的错误?

谢谢

在 yourDrive:''xampp''apache''conf''extra 中编辑您的 httpd-vhosts 文件 对于要添加的每个域

<VirtualHost *:80>
  DocumentRoot "yourDrive:'xampp'htdocs'temp"
  ServerName www.temp.dev
  ServerAlias www.temp.dev
  ErrorLog "yourDrive:/xampp/htdocs/temp/error.log"
 <Directory "yourDrive:/xampp/htdocs/temp">
   Order allow,deny
   Allow from all
 </Directory>