File kohana2-apache_include of Package kohana2

#
# Configuration for kohana2
#

<IfDefine KOHANA2>
  UseCanonicalName On
  Alias /kohana "/srv/www/kohana2"

  <Directory /srv/www/kohana2>
   Options FollowSymLinks Indexes
   AllowOverride None
   <IfModule mod_authz_core.c>
      Require all granted
   </IfModule>
   <IfModule !mod_authz_core.c>
      Order allow,deny
      Allow from all
   </IfModule>

   <Files ~ .(inc.php|tpl)>
   <IfModule mod_authz_core.c>
      Require all denied
   </IfModule>
   <IfModule !mod_authz_core.c>
      Order allow,deny
      Deny from all
   </IfModule>
   </Files>

   <IfModule mod_php5.c>
       # php settings
       AcceptPathInfo on
       LimitRequestBody 0
       php_admin_flag magic_quotes_gpc on
       php_admin_flag magic_quotes_runtime Off
       php_admin_flag file_uploads on
       php_admin_flag short_open_tag Off
       php_admin_flag session.auto_start Off
       php_admin_flag session.bug_compat_warn Off
       php_admin_flag allow_url_fopen Off
       php_admin_flag safe_mode On

       # make sure users dont change the following settings
       php_admin_flag register_globals Off
       php_admin_flag allow_url_include Off

       # improved security
       php_admin_value open_basedir "/srv/www/kohana2:/tmp:/usr/bin:/usr/share/kohana2:/etc/kohana2"
   </IfModule>

   <IfModule mod_dir.c>
       DirectoryIndex index.php index.html index.htm
   </IfModule>

   <IfModule mod_rewrite>
		# Turn on URL rewriting
		RewriteEngine On

		# Installation directory
		RewriteBase /kohana/

		# Protect application and system files from being viewed
		#RewriteRule ^(application|modules|system) - [F,L]

		# Protect application and system files from being viewed
		RewriteCond $1 ^(application|modules|system)

		# Rewrite to index.php/access_denied/URL
		RewriteRule ^(.*)$ index.php/access_denied/$1 [PT,L]

		# Allow these directories and files to be displayed directly:
		# - index.php (DO NOT FORGET THIS!)
		# - robots.txt
		# - favicon.ico
		# - Any file inside of the images/, js/, or css/ directories
		RewriteCond $1 ^(index\.php|robots\.txt|favicon\.ico|images|js|css)

		# No rewriting
		RewriteRule ^(.*)$ - [PT,L]

		# Allow any files or directories that exist to be displayed directly
		RewriteCond %{REQUEST_FILENAME} !-f
		RewriteCond %{REQUEST_FILENAME} !-d
		# Rewrite all other URLs to index.php/URL
		RewriteRule .* index.php/$0 [PT,L]
   </IfModule>
  </Directory>
</IfDefine>
openSUSE Build Service is sponsored by