MAMP:如何在Mac上的localhost上使用子域?

时间:2019-08-15 04:05:16

标签: mamp

我在MAMP 5.4上运行了多个Laravel项目
我的三个项目运行得非常好,但是我的第四个(不是子域)却没有。
我的/etc/apache2/extra/httpd-vhosts.conf file显示:

<VirtualHost *:8888>
     ServerName test1
     DocumentRoot "/Applications/MAMP/htdocs/test1/public"
</VirtualHost>
<VirtualHost *:8888>
     ServerName test2
     DocumentRoot "/Applications/MAMP/htdocs/test2/public"
</VirtualHost>
<VirtualHost *:8888>
     ServerName test3
     DocumentRoot "/Applications/MAMP/htdocs/test3/public"
</VirtualHost>
<VirtualHost *:8888>
     ServerName the-test.something.com
     ServerAlias *.something.com
     DocumentRoot "/Applications/MAMP/htdocs/the_test/public"
</VirtualHost>

在我的/etc/hosts文件下,

127.0.0.1 the-test.something.com
::1 the-test.something.com

当我访问the-test.something.com时,我得到了
Forbidden You don't have permission to access /public on this server.
为什么会这样?

0 个答案:

没有答案