1
votes

I have Virtual Machine hosted on Azure with Drupal.

In drupal/htdocs/sites i have created new folder with name my-site.com

Then I have uploaded all my website data to this folder. They are default.settings.php, settings.php and files folder.

I have uploaded my database via phpMyAdmin and set proper login and password in settings.php

When I try to open this site via this url: http://my.ip.address/sites/my-site.com it shows me an error message:

Forbidden

You don't have permission to access /sites/my-site.com/ on this server.

My htaccess file has these following lines:

# 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>

What I'm doing wrong?

2

2 Answers

1
votes

According the post http://planken.org/2013/11/drupal-724-htaccess-modifications-private-and-temp-folders, it seems that the content in your .htaccess file is to protect the code and files and to prevent code execution in the directory.

To run the complete Drupal application in the sub-directory, you can try to copy the original .htaccess file in the root directory to the sub-directory.

You can get the sample .htaccess file at https://github.com/drupal/drupal/blob/8.1.x/.htaccess

0
votes

You should first check that there is a .htaccess file in the docroot of your site. Sometimes when you copy a site over hidden files in the docroot are omitted. The following command will copy the missing hidden files:

cp source/.* destination/

The .htaccess you posted is in your files directory which isn't the main .htaccess we care about for trying to access the site via index.php