php - 无法使用 Google 云端硬盘让本地主机在 WAMP 上工作

标签 php windows apache wamp

<分区>

我知道这已被问过 1 万次,但其他地方的解决方案似乎对我不起作用。

我正在使用 apache 2.4.2 运行 WAMP 2.2,并尝试将 DocumentRoot 设置为与默认文件夹不同的文件夹

http://localhost/phpmyadmin/工作正常,但我无法加载 localhost 并继续获取:

enter image description here

如果我尝试 localhost:8080 我会得到:

enter image description here

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 我得到:

enter image description here

我也可以从命令行使用 php 就好了: enter image description here

我已经尝试了我在网上找到的所有方法都无济于事,还有什么问题吗?

最佳答案

尝试通过这个改变文档根 block ...

<Directory /> 
    Options Indexes 
    FollowSymLinks MultiViews
    AllowOverride all 
    Require all granted
</Directory>

然后重新启动 Apache。

关于php - 无法使用 Google 云端硬盘让本地主机在 WAMP 上工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37715862/

相关文章:

windows - 在 Windows C++ 控制台应用程序中使用 wchar_t/wmain 有意义吗?

相当于 dd 的 Windows Powershell 命令行

php - 在 Xampp/Windows 7 上安装 ImageMagick

apache - Localhost XAMPP 5.6.3-0 对图像抛出 403(禁止)

apache - http和https如何使用相同的端口

php - KnpSnappyBundle 保存文件到服务器

php - 如何知道 laravel 模型值是否在保存回调时更改

php - 提交按钮仅将多个问题视为使用 php 和数据库的一个问题

c++ - 如何将键盘事件发送到 Windows 中的各种应用程序?

php - 将 JavaScript 变量传递给 PHP