<分区>
我知道这已被问过 1 万次,但其他地方的解决方案似乎对我不起作用。
我正在使用 apache 2.4.2 运行 WAMP 2.2,并尝试将 DocumentRoot 设置为与默认文件夹不同的文件夹
http://localhost/phpmyadmin/工作正常,但我无法加载 localhost
并继续获取:
如果我尝试 localhost:8080
我会得到:
httpd.conf
ServerName localhost
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Require all denied
</Directory>
....
DocumentRoot "C:/Users/wesley.smith/Google Drive/"
<Directory "C:/Users/wesley.smith/Google Drive/">
Options Indexes FollowSymLinks
AllowOverride All
# onlineoffline tag - do not remove
Require all granted
</Directory>
在我的主机文件中,我取消了以下注释:
# localhost name resolution is handled within DNS itself.
127.0.0.1 localhost
::1 localhost
我安装了使用端口 80 的 Skype,所以我转到 工具 -> 选项 -> 高级 -> 连接
并取消选中“使用端口 80 和 443 作为替代”框。然后我关掉了 Skype 以防万一
如果我运行 Apache->Service->test port 80
我得到: