source: trunk/.htaccess @ 7589

Revision 7589, 6.5 KB checked in by douglas, 8 years ago (diff)

Ticket #3209 - Integrar módulo de sincronização Z-push ao Expresso

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 ^rest(.*)$ prototype/rest/$1 [QSA,L]
128#RewriteRule ^.*$ - [F] #Comentado para fazer funcionar o Active-Sync Linha abaixo
129RewriteRule ^Microsoft-Server-ActiveSync(.*) zpush/index.php$1 [E=ACTIVESYNC:true,E=REMOTE_USER:%{HTTP:Authorization}]
130#
131# Seguranca e restricoes de acesso
132#
133# Ao próprio htaccess e outros arquivos sensiveis (como senhas)
134<Files ~ "\.(htaccess|htpasswd|ini|srv|log|sh|svn)$">
135        Order Allow,Deny
136        Deny from all
137        Satisfy any
138</Files>
139
140#<Location /setup>
141#       Options None
142#        Order deny,allow
143#       # Sua rede local
144#        allow from 192.168.0.0/24
145#</Location>
146
147#
148# Configuracoes do PHP para o Expresso
149# IMPORTANTE: estas configurações não serão carregadas
150#  em ambientes que executam o PHP via FastCGI, FPM,
151#  ou similares. Nestes casos, estas configurações
152#  devem ser adicionadas diretamente ao php.ini.
153#
154<IfModule mod_php5.c>
155        # Configuracoes de sessao
156        php_flag session.auto_start Off
157        php_flag session.use_cookies Off
158        # Uses dir as a session handler
159        php_value session.save_handler "files"
160        php_value session.save_path "/dev/shm"
161        # Use memcache as a session handler
162        #php_value session.save_handler "memcache"
163        #php_value session.save_path "tcp://localhost:11211?persistent=1&weight=1&timeout=1&retry_interval=15"
164        php_value session.serialize_handler "php"
165        php_value session.gc_probability 1
166        php_value session.gc_divisor 100
167        php_value session.gc_maxlifetime 14400
168        php_value session.cache_limiter nocache
169        php_value session.cache_expire 180
170        php_flag session.use_trans_sid Off
171
172        php_flag short_open_tag On
173        php_flag zlib.output_compression Off
174        php_flag output_buffering Off
175        php_flag register_argc_argv On
176        php_flag allow_url_include Off
177        php_value variables_order "EGPCS"
178        php_value default_charset "iso-8859-1"
179        php_value default_mimetype "text/html"
180        php_value date.timezone "America/Sao_Paulo"
181        php_value url_rewriter.tags "a=href,area=href,frame=src,form=,fieldset="
182        #php_value url_rewriter.tags "a=href,area=href,frame=src,input=src,form=,fieldset="
183
184        php_value mbstring.func_overload "0"
185        #php_value mbstring.func_overload "7"
186        #php_flag mbstring.strict_detection On
187
188        php_value max_execution_time 90
189        php_value max_input_time 120
190        php_value memory_limit 196M
191        php_value post_max_size 50M
192        php_value upload_max_filesize 40M
193
194        # Para ambiente de desenvolvimento
195        #php_flag log_errors On
196        #php_value error_reporting "E_ALL & ~E_NOTICE"
197        #php_flag ignore_repeated_errors On
198        #php_flag report_memleaks On
199        #php_flag html_errors On
200        #php_value error_log /tmp/php.log
201
202        # deprecate 5.3.0, removed 5.4.0
203        php_flag magic_quotes_gpc Off
204        php_flag magic_quotes_runtime Off
205        php_flag register_globals Off
206        php_flag register_long_arrays Off
207        php_flag allow_call_time_pass_reference On
208        php_flag session.bug_compat_42 0
209        php_flag session.bug_compat_warn 0
210</IfModule>
Note: See TracBrowser for help on using the repository browser.