如何在localhost:8000上运行的laravel 5.1中使用子域路由?

时间:2015-12-22 09:29:50

标签: routing subdomain laravel-5.1

我正在尝试使用在localhost:8000上运行的laravel 5.1学习子域路由。

我在这个主题上找到了不同的内容,但每个内容都集中在真正的Web服务器上运行的应用程序。

这里有一个sub domain routing

我如何在当地环境中这样做?

1 个答案:

答案 0 :(得分:0)

你可以试试这个 编辑Windows \ System32 \ drivers \ etc \中的hosts文件以重定向到假网址127.0.0.1 fakeurl.com httpd-vhosts.conf文件:DocumentRoot“/ path / to / my / laravel / app”ServerName sub1.fakeurl.com 然后重启你的服务器 答案来源: User Authentication Across Subdomains on Localhost