瀏覽代碼

#958 [RPM Packaging] Integrated Igor's patch to support both Apache 2.2 and 2.4.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3269 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 11 年之前
父節點
當前提交
c82deff65a
共有 1 個文件被更改,包括 38 次插入19 次删除
  1. 38 19
      setup/install/apache.conf.tpl

+ 38 - 19
setup/install/apache.conf.tpl

@@ -1,35 +1,54 @@
-# _ITOP_NAME_ default Apache configuration
-
 Alias /_ITOP_NAME_ _ITOP_DATADIR_/_ITOP_NAME_
 
 <Directory _ITOP_DATADIR_/_ITOP_NAME_>
-	Options FollowSymLinks
-	DirectoryIndex index.php
-
-	<IfModule mod_php5.c>
-		AddType application/x-httpd-php .php
+    Options FollowSymLinks
+    DirectoryIndex index.php
 
-		php_flag magic_quotes_gpc Off
-		php_flag track_vars On
-		php_flag register_globals Off
-	</IfModule>
+    <IfModule mod_authz_core.c>
+        Require all granted
+    </IfModule>
+    <IfModule !mod_authz_core.c>
+        Allow from all
+    </IfModule>
 
+    <IfModule mod_php5.c>
+      AddType application/x-httpd-php .php
+      php_flag magic_quotes_gpc Off
+      php_flag track_vars On
+      php_flag register_globals Off
+     </IfModule>
 </Directory>
 
 # Disallow web access to directories that don't need it
 <Directory _ITOP_DATADIR_/_ITOP_NAME_/lib>
-    Order Deny,Allow
-    Deny from All
+    <IfModule mod_authz_core.c>
+        Require all denied
+    </IfModule>
+    <IfModule !mod_authz_core.c>
+        Deny from all
+    </IfModule>
 </Directory>
 <Directory _ITOP_DATADIR_/_ITOP_NAME_/conf>
-    Order Deny,Allow
-    Deny from All
+    <IfModule mod_authz_core.c>
+        Require all denied
+    </IfModule>
+    <IfModule !mod_authz_core.c>
+        Deny from all
+    </IfModule>
 </Directory>
 <Directory _ITOP_DATADIR_/_ITOP_NAME_/log>
-    Order Deny,Allow
-    Deny from All
+    <IfModule mod_authz_core.c>
+        Require all denied
+    </IfModule>
+    <IfModule !mod_authz_core.c>
+        Deny from all
+    </IfModule>
 </Directory>
 <Directory _ITOP_DATADIR_/_ITOP_NAME_/data>
-    Order Deny,Allow
-    Deny from All
+    <IfModule mod_authz_core.c>
+        Require all denied
+    </IfModule>
+    <IfModule !mod_authz_core.c>
+        Deny from all
+    </IfModule>
 </Directory>