Php 403禁止,将站点上载到drupal时

Php 403禁止,将站点上载到drupal时,php,.htaccess,azure,drupal,drupal-7,Php,.htaccess,Azure,Drupal,Drupal 7,我用Drupal在Azure上托管了虚拟机 在drupal/htdocs/sites中,我创建了一个名为my site.com 然后,我已将所有网站数据上载到此文件夹。它们是default.settings.php、settings.php和files文件夹 我已经通过phpMyAdmin上传了我的数据库,并在settings.php 当我尝试通过此url打开此网站时:http://my.ip.address/sites/my-site.com它向我显示一条错误消息: Forbidden Yo

我用Drupal在Azure上托管了虚拟机

drupal/htdocs/sites
中,我创建了一个名为
my site.com

然后,我已将所有网站数据上载到此文件夹。它们是
default.settings.php
settings.php
files
文件夹

我已经通过phpMyAdmin上传了我的数据库,并在
settings.php

当我尝试通过此url打开此网站时:
http://my.ip.address/sites/my-site.com
它向我显示一条错误消息:

Forbidden

You don't have permission to access /sites/my-site.com/ on this server.
我的htaccess文件有以下几行:

# Turn off all options we don't need.
Options None
Options +FollowSymLinks

# Set the catch-all handler to prevent scripts from being executed.
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
<Files *>
# Override the handler again if we're run later in the evaluation list.
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003
</Files>

# If we know how to do it safely, disable the PHP engine entirely.
<IfModule mod_php5.c>
  php_flag engine off
</IfModule>
#关闭所有不需要的选项。
选项无
选项+FollowSymLinks
#设置“捕获所有”处理程序以防止执行脚本。
SetHandler Drupal_安全性_Do_Not_Remove_参见_SA_2006_006
#如果稍后在评估列表中运行,请再次重写处理程序。
SetHandler Drupal\u安全性\u不\u移除\u见\u SA\u 2013\u 003
#如果我们知道如何安全地执行此操作,请完全禁用PHP引擎。
php_标志引擎关闭

我做错了什么?

您应该首先检查站点的docroot中是否有.htaccess文件。有时,当您在docroot中的隐藏文件上复制站点时,会忽略这些文件。以下命令将复制丢失的隐藏文件:

cp source/.* destination/
您发布的.htaccess位于您的文件目录中,该目录不是我们关心的主要.htaccess,因为我们试图通过index.php访问该网站。根据帖子,您的
.htaccess
文件中的内容似乎是为了保护代码和文件,并防止代码在目录中执行

要在子目录中运行完整的Drupal应用程序,可以尝试将根目录中的原始
.htaccess
文件复制到子目录中

您可以在以下位置获取示例
.htaccess
文件: