source: branches/2.4/.htaccess @ 6098

Revision 6098, 6.3 KB checked in by wmerlotto, 12 years ago (diff)

Ticket #2421 - Comentado o bloco de configuracao que define o log do PHP no htaccess

Line 
1#
2# Configuracoes principais
3#
4Options -ExecCGI -MultiViews -Indexes
5DirectoryIndex index.php index.html index.htm
6DefaultLanguage pt-BR
7AddDefaultCharset ISO-8859-1
8ServerSignature Off
9
10#
11# Configuracoes de "headers", cache e outras otimizacoes
12#
13# Disable caches and browsers from being able to validate files,
14# so they are forced to rely on your Cache-Control and Expires header.
15<ifModule mod_headers.c>
16        Header unset ETag
17</ifModule>
18FileETag None
19
20#-> http://www.htaccesselite.com/htaccess/cache-control-http-headers-vt65.html
21#      300   5 M
22#     2700  45 M
23#     3600   1 H
24#    54000  15 H
25#    86400   1 D
26#   518400   6 D
27#   604800   1 W
28#  1814400   3 W
29#  2419200   1 M
30# 26611200  11 M
31# 29030400   1 Y (never expire)
32
33## HEADER CACHING ##
34#-> http://www.htaccesselite.com/htaccess/caching-using-header-vt2.html
35#<FilesMatch "\.(flv|gif|jpg|jpeg|png|ico)$">
36#       Header set Cache-Control "max-age=2592000"
37#</FilesMatch>
38#<FilesMatch "\.(js|css|pdf|swf)$">
39#   Header set Cache-Control "max-age=604800"
40#</FilesMatch>
41#<FilesMatch "\.(html|htm|txt)$">
42#   Header set Cache-Control "max-age=600"
43#</FilesMatch>
44#<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
45#   Header unset Cache-Control
46#</FilesMatch>
47
48## ALTERNATE EXPIRES CACHING ##
49#-> htaccesselite.com/d/use-htaccess-to-speed-up-your-site-discussion-vt67.html
50#<ifModule mod_expires.c>
51#       ExpiresActive On
52#       ExpiresDefault "access plus 1 day"
53        # Permite que os arquivos sejam "cacheados" tanto para http quanto para https
54#       Header set Cache-Control "public"
55
56#       ExpiresByType text/html "access plus 1 hour"
57#       ExpiresByType text/plain "access plus 1 hour"
58#       ExpiresByType text/css "access plus 1 hour"
59#       ExpiresByType text/javascript "access plus 1 hour"
60#       ExpiresByType application/x-javascript "access plus 1 hour"
61
62#       ExpiresByType image/gif "access plus 1 week"
63#       ExpiresByType image/jpg "access plus 1 week"
64#       ExpiresByType image/png "access plus 1 week"
65
66        #<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
67                #ExpiresActive Off
68        #</FilesMatch>
69#</ifModule>
70
71#
72# Compactacao
73#
74<IfModule mod_deflate.c>
75        SetOutputFilter DEFLATE
76
77        AddOutputFilterByType DEFLATE application/x-httpd-php
78        AddOutputFilterByType DEFLATE application/x-javascript
79        AddOutputFilterByType DEFLATE application/x-httpd-fastphp
80        AddOutputFilterByType DEFLATE application/xhtml+xml
81        AddOutputFilterByType DEFLATE application/xml
82        AddOutputFilterByType DEFLATE application/rss+xml
83        AddOutputFilterByType DEFLATE application/atom_xml
84        AddOutputFilterByType DEFLATE text/html
85        AddOutputFilterByType DEFLATE text/plain
86        AddOutputFilterByType DEFLATE text/xml
87        AddOutputFilterByType DEFLATE text/css
88        AddOutputFilterByType DEFLATE image/svg+xml
89
90        # Use low settings for compression to make sure impact on server is low
91        #DeflateMemLevel 2
92        #Highest 9 - Lowest 1
93        #DeflateCompressionLevel 9
94
95        #Skip browsers with known problems
96        BrowserMatch ^Mozilla/4 gzip-only-text/html
97        BrowserMatch ^Mozilla/4\.0[678] no-gzip
98        BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
99
100        # properly handle requests coming from behind proxies
101        <IfModule mod_headers.c>
102                # Make sure proxies don't deliver the wrong content
103                Header append Vary User-Agent env=!dont-vary
104        </IfModule>
105
106        SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
107        SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
108        SetEnvIfNoCase Request_URI \.(?:avi|mov|mp3|ogg|wmv|wma)$ no-gzip dont-vary
109        SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
110
111        # Log file compression
112#       DeflateFilterNote Input instream
113#       DeflateFilterNote Output outstream
114#       DeflateFilterNote Ratio ratio
115#       LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
116#       CustomLog /var/log/apache2/deflate.log deflate
117
118</ifModule>
119
120
121#
122# Reescritas e redirecionamentos
123#
124RewriteEngine On
125## DENY REQUEST BASED ON REQUEST METHOD ##
126RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS|HEAD)$ [NC]
127RewriteRule ^.*$ - [F]
128
129#
130# Seguranca e restricoes de acesso
131#
132# Ao próprio htaccess e outros arquivos sensiveis (como senhas)
133<Files ~ "\.(htaccess|htpasswd|ini|srv|log|sh|svn)$">
134        Order Allow,Deny
135        Deny from all
136        Satisfy any
137</Files>
138
139#<Location /setup>
140#       Options None
141#        Order deny,allow
142#       # Sua rede local
143#        allow from 192.168.0.0/24
144#</Location>
145
146#
147# Configuracoes do PHP para o Expresso
148# IMPORTANTE: estas configurações não serão carregadas
149#  em ambientes que executam o PHP via FastCGI, FPM,
150#  ou similares. Nestes casos, estas configurações
151#  devem ser adicionadas diretamente ao php.ini.
152#
153<IfModule mod_php5.c>
154        # Configuracoes de sessao
155        php_flag session.auto_start Off
156        php_flag session.use_cookies Off
157        # Uses dir as a session handler
158        php_value session.save_handler "files"
159        php_value session.save_path "/dev/shm"
160        # Use memcache as a session handler
161        #php_value session.save_handler "memcache"
162        #php_value session.save_path "tcp://localhost:11211?persistent=1&weight=1&timeout=1&retry_interval=15"
163        php_value session.serialize_handler "php"
164        php_value session.gc_probability 1
165        php_value session.gc_divisor 100
166        php_value session.gc_maxlifetime 1440
167        php_value session.cache_limiter nocache
168        php_value session.cache_expire 180
169        php_flag session.use_trans_sid Off
170
171        php_flag short_open_tag On
172        php_flag zlib.output_compression Off
173        php_flag output_buffering Off
174        php_flag register_argc_argv On
175        php_flag allow_url_include Off
176        php_value variables_order "EGPCS"
177        php_value default_charset "iso-8859-1"
178        php_value default_mimetype "text/html"
179        php_value date.timezone "America/Sao_Paulo"
180        php_value url_rewriter.tags "a=href,area=href,frame=src,form=,fieldset="
181        #php_value url_rewriter.tags "a=href,area=href,frame=src,input=src,form=,fieldset="
182       
183        php_value mbstring.func_overload "0"
184        #php_value mbstring.func_overload "7"
185        #php_flag mbstring.strict_detection On
186
187        php_value max_execution_time 90
188        php_value max_input_time 120
189        php_value memory_limit 196M
190        php_value post_max_size 50M
191        php_value upload_max_filesize 40M
192
193        # Para ambiente de desenvolvimento
194        #php_flag log_errors On
195        #php_value error_reporting "E_ALL & ~E_NOTICE"
196        #php_flag ignore_repeated_errors On
197        #php_flag report_memleaks On
198        #php_flag html_errors On
199        #php_value error_log /tmp/php.log
200
201        # deprecate 5.3.0, removed 5.4.0
202        php_flag magic_quotes_gpc Off
203        php_flag magic_quotes_runtime Off
204        php_flag register_globals Off
205        php_flag register_long_arrays Off
206        php_flag allow_call_time_pass_reference On
207        php_flag session.bug_compat_42 0
208        php_flag session.bug_compat_warn 0
209</IfModule>
Note: See TracBrowser for help on using the repository browser.