我终于想出了一个办法。首先,我必须通过从 Wamp Aestran 托盘菜单中选择它来打开和编辑我的 Apache httpd.conf。我不得不取消注释该行
#Include conf/extra/httpd-vhosts.conf
之后,我打开了位于
<wampdirectory>/bin/apache/apache.x.y.z/conf/extra/httpd-vhosts.conf
然后我添加了以下几行。
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "C:/wamp/www"
ServerName localhost
Options Indexes FollowSymLinks
<Directory "C:/wamp/www">
AllowOverride All
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
#If you want to allow access from your internal network
# For specific ip addresses add one line per ip address
#Allow from 192.168.0.100
# For every ip in the subnet, just use the first 3 numbers of the subnet
#Allow from 192.168.0
</Directory>
</VirtualHost>
## must be first so the the wamp menu page loads when you use just localhost as the domain name
<VirtualHost *:80>
DocumentRoot "C:/wamp/sites/laravel/public"
ServerName laravel.dev
Options Indexes FollowSymLinks
<Directory "C:/wamp/sites/laravel/public">
AllowOverride All
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
#If you want to allow access from your internal network
# For specific ip addresses add one line per ip address
#Allow from 192.168.0.100
# For every ip in the subnet, just use the first 3 numbers of the subnet
#Allow from 192.168.0
</Directory>
</VirtualHost>
下一步是在 C:\windows\system32\drivers\etc 编辑我的主机文件
并添加
127.0.0.1 laravel.dev
然后重新启动 Wamp,它工作。感谢你们为我指明正确的方向。真的很欣赏