Logoj0ke.net Open Build Service > Projects > server:monitoring > kohana > kohana-apache_include
Sign Up | Log In

File kohana-apache_include of Package kohana

 
1
#
2
# Configuration for Kohana
3
#
4
5
UseCanonicalName On
6
Alias /kohana "/srv/www/kohana"
7
8
<Directory /srv/www/kohana>
9
   Options FollowSymLinks Indexes
10
   AllowOverride None
11
   Order allow,deny
12
   Allow from all
13
14
   <Files ~ .(inc.php|tpl)>
15
       Order allow,deny
16
       Deny from all
17
   </Files>
18
19
   <IfModule mod_php5.c>
20
       # php settings
21
       AcceptPathInfo on
22
       LimitRequestBody 0
23
       php_admin_flag magic_quotes_gpc on
24
       php_admin_flag magic_quotes_runtime Off
25
       php_admin_flag file_uploads on
26
       php_admin_flag short_open_tag Off
27
       php_admin_flag session.auto_start Off
28
       php_admin_flag session.bug_compat_warn Off
29
       php_admin_flag allow_url_fopen Off
30
       php_admin_flag safe_mode On
31
32
       # make sure users dont change the following settings
33
       php_admin_flag register_globals Off
34
       php_admin_flag allow_url_include Off
35
36
       # improved security
37
       php_admin_value open_basedir "/srv/www/kohana:/tmp:/usr/bin:/usr/share/kohana:/etc/kohana"
38
   </IfModule>
39
40
   <IfModule mod_dir.c>
41
       DirectoryIndex index.php index.html index.htm
42
   </IfModule>
43
44
   <IfModule mod_rewrite>
45
        # Turn on URL rewriting
46
        RewriteEngine On
47
48
        # Installation directory
49
        RewriteBase /kohana/
50
51
        # Protect application and system files from being viewed
52
        #RewriteRule ^(application|modules|system) - [F,L]
53
54
        # Protect application and system files from being viewed
55
        RewriteCond $1 ^(application|modules|system)
56
57
        # Rewrite to index.php/access_denied/URL
58
        RewriteRule ^(.*)$ index.php/access_denied/$1 [PT,L]
59
60
        # Allow these directories and files to be displayed directly:
61
        # - index.php (DO NOT FORGET THIS!)
62
        # - robots.txt
63
        # - favicon.ico
64
        # - Any file inside of the images/, js/, or css/ directories
65
        RewriteCond $1 ^(index\.php|robots\.txt|favicon\.ico|images|js|css)
66
67
        # No rewriting
68
        RewriteRule ^(.*)$ - [PT,L]
69
70
        # Allow any files or directories that exist to be displayed directly
71
        RewriteCond %{REQUEST_FILENAME} !-f
72
        RewriteCond %{REQUEST_FILENAME} !-d
73
        # Rewrite all other URLs to index.php/URL
74
        RewriteRule .* index.php/$0 [PT,L]
75
   </IfModule>
76
</Directory>
77