我知道这已被问过10次,但其他地方的解决方案似乎对我不起作用。
我使用apache 2.4.2运行WAMP 2.2并尝试将DocumentRoot设置为与默认文件夹不同的文件夹
http://localhost/phpmyadmin/工作正常,但我无法加载localhost
并继续获取:
如果我尝试localhost:8080
,我会:
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,所以我转到Tools -> Options -> Advanced -> Connections
并取消选中框#34;使用端口80和443替代#34;。然后我转向skype只是为了好的措施
如果我运行Apache-> Service-> test port 80
,我会:
答案 0 :(得分:-1)
尝试通过此更改文档根块...
<Directory />
Options Indexes
FollowSymLinks MultiViews
AllowOverride all
Require all granted
</Directory>
重新启动Apache。