0
<VirtualHost *.laravel:80>
    DocumentRoot "z:\wamp\www\laravel\%1\public"
    ServerName %1.laravel
</VirtualHost>

这不起作用。我在这里要做的是拥有http://*.laravel/be的documentrootz:\wamp\www\laravel\(wildcard * value here)\public

我不知道如何获得通配符的值。我的 Windowshosts文件已正确设置为指向 localhost

4

1 回答 1

0

You are looking to use VitualDocumentRoot instead of DocumentRoot http://httpd.apache.org/docs/2.2/mod/mod_vhost_alias.html#virtualdocumentroot

Also, ServerName is always static (all your dynamic DocumentRoots will have the same exact ServerName). It's one of the problems with dynamic VHs.

于 2013-06-29T13:51:06.663 回答