Pārlūkot izejas kodu

Enable directory based access for plugins

WP Social Plugin redirects to a directory and requires index.php
to be picked up automatically.

Note that listing of files in dir is controlled by Options -Indexes.
Girish Ramakrishnan 7 gadi atpakaļ
vecāks
revīzija
6880d38658
1 mainītis faili ar 6 papildinājumiem un 6 dzēšanām
  1. 6 6
      apache/wordpress.conf

+ 6 - 6
apache/wordpress.conf

@@ -5,26 +5,26 @@
     CustomLog "|/bin/cat" combined
 
     <Directory /app/code/>
-        Options +FollowSymLinks
+        Options +FollowSymLinks -Indexes
         AllowOverride All
         Require all granted
     </Directory>
 
-    # some directories must be protected
-   <Directory /app/code/wp-content>
+    <Directory /app/code/wp-content>
         DirectoryIndex Off
         AllowOverride None
         <IfModule mod_php7.c>
             php_admin_flag engine off
         </IfModule>
-   </Directory>
+    </Directory>
 
     # many wp plugins have .htaccess in them to AllowOverride is All
     # ARI adminer, social media plugins expose a "public" endpoint that requires us
     # to allow PHP to be executed as a direct entry point (as opposed to being just included
     # from wp core). So php_admin_flag is on
-   <Directory /app/code/wp-content/plugins>
-        DirectoryIndex Off
+    # Some plugins like Wordpress Social Login require index.php
+    <Directory /app/code/wp-content/plugins>
+        DirectoryIndex index.php
         AllowOverride All
         <IfModule mod_php7.c>
             php_admin_flag engine on