两个Laravel应用程序干涉虚拟主机(XAMPP)
我在XAMPP的HTDOCS上有2个Laravel应用程序。他们每个人都有这样的虚拟主机设置:
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/app1/public"
ServerName app1.test
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/app2/public"
ServerName app2.test
</VirtualHost>
例如,在etc/hosts文件中使用适当的设置:
127.0.0.1 app1.test
127.0.0.1 app2.test
但是由于某种原因,彼此之间正在互相干扰,例如,数据库的.ENV值被逐渐缩小,因为App1的数据库是从App2引用数据库中的表格,并出现此错误:
Base table or view not found: 1146 Table 'some_table' doesn't exist
任何帮助都将受到赞赏。
I have 2 Laravel apps located in htdocs on XAMPP. Each of them have a virtual hosts setting like so:
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/app1/public"
ServerName app1.test
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/app2/public"
ServerName app2.test
</VirtualHost>
with proper settings in etc/hosts file:
127.0.0.1 app1.test
127.0.0.1 app2.test
But for some reason the are interfering with each other, for example seems that .env values for the database are jumbled up, since database from app1 is referencing a table from database from app2 and this error appears:
Base table or view not found: 1146 Table 'some_table' doesn't exist
Any help is appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您可以使用称为 laragon 而不是XAMPP的非常友好的软件包。
在此软件包中,您可以将 与SSL 一起使用相同数据库的多个PHP版本。另外,您可以使用 laragon cmd 进行任何需求。
这是Laragon设置的链接
laragon设置
I think you can use very friendly package called as Laragon rather than XAMPP.
In this package you can use multiple php versions with same database along with ssl. Also you can whatever you need with Laragon CMD.
Here is the link for Laragon setup
Laragon setup