2017-03-20 36 views
0

私はDrupal-8(Drupal-8)を実行しているDrupal-server(UBUNTU)を持っています。私は私のルートディレクトリにいくつかのphpファイルを置く場合私は私のブラウザでそれらを実行することができますが、私はサブディレクトリに同じファイルを配置すると、ブラウザーは403禁じられたエラーを与えた。 すでに権限を777に変更しましたが、機能していません。このサーバ上のファイルにアクセスする権限がありません

誰かが私を助けることができますか?

"192.168.51.60、ポート80で禁断の

あなたがこのサーバー上MYFILEにアクセスする権限がありません。 のApache/2.4.18(Ubuntuの)サーバー"

+0

だけでなく、すべてのアップWebのルートディレクトリにすべての親のdirsへのアクセスを許可してください。 – MilanG

答えて

0

Iドンあなたのサーバーがどのように正確に設定されていて、どのフォルダが.phpファイルであるかを知っていませんが、Drupalのインストールはデフォルトで.htaccessファイルを含んでいます。 は、このセクションのためのあなたの.htaccessファイルを確認します。

# For security reasons, deny access to other PHP files on public sites. 
# Note: The following URI conditions are not anchored at the start (^), 
# because Drupal may be located in a subdirectory. To further improve 
# security, you can replace '!/' with '!^/'. 
# Allow access to PHP files in /core (like authorize.php or install.php): 
RewriteCond %{REQUEST_URI} !/core/[^/]*\.php$ 
# Allow access to test-specific PHP files: 
RewriteCond %{REQUEST_URI} !/core/modules/system/tests/https?.php 
# Allow access to Statistics module's custom front controller. 
# Copy and adapt this rule to directly execute PHP files in contributed or 
# custom modules or to run another PHP application in the same directory. 
RewriteCond %{REQUEST_URI} !/core/modules/statistics/statistics.php$ 
# Deny access to any other PHP files that do not match the rules above. 
# Specifically, disallow autoload.php from being served directly. 
RewriteRule "^(.+/.*|autoload)\.php($|/)" - [F] 
関連する問題