... | @@ -26,6 +26,15 @@ |
... | @@ -26,6 +26,15 @@ |
|
|
|
|
|
#### Bloqueio de Bots indesejados que entopem o servidor #####
|
|
#### Bloqueio de Bots indesejados que entopem o servidor #####
|
|
|
|
|
|
|
|
## Automated HTTP libraries
|
|
|
|
RewriteCond %{HTTP_USER_AGENT} ^.*(dav.pm/v|libwww-perl|urllib|python-requests|python-httplib2|winhttp.winhttprequest|lwp-request|lwp-trivial|fasthttp|Go-http-client|Java|httplib|httpclient|Zend_Http_Client).*$ [NC]
|
|
|
|
RewriteRule .* - [F,L]
|
|
|
|
|
|
|
|
## Commonly seen in DDoS attacks
|
|
|
|
RewriteCond %{HTTP_USER_AGENT} ^.*(CtrlFunc|w00tw00t|Apachebench).*$ [NC]
|
|
|
|
RewriteRule .* - [F,L]
|
|
|
|
|
|
|
|
|
|
RewriteCond %{HTTP_USER_AGENT} MJ12bot
|
|
RewriteCond %{HTTP_USER_AGENT} MJ12bot
|
|
RewriteRule .* - [F]
|
|
RewriteRule .* - [F]
|
|
RewriteCond %{HTTP_USER_AGENT} 80legs [NC]
|
|
RewriteCond %{HTTP_USER_AGENT} 80legs [NC]
|
... | @@ -41,8 +50,6 @@ |
... | @@ -41,8 +50,6 @@ |
|
##### Configuração padrão do php do projeto #####
|
|
##### Configuração padrão do php do projeto #####
|
|
|
|
|
|
<IfModule mod_php5.c>
|
|
<IfModule mod_php5.c>
|
|
php_value memory_limit 512M
|
|
|
|
php_value max_execution_time 18000
|
|
|
|
php_flag magic_quotes_gpc off
|
|
php_flag magic_quotes_gpc off
|
|
php_flag session.auto_start off
|
|
php_flag session.auto_start off
|
|
php_flag suhosin.session.cryptua off
|
|
php_flag suhosin.session.cryptua off
|
... | @@ -59,10 +66,10 @@ |
... | @@ -59,10 +66,10 @@ |
|
RewriteRule ^downloader/ - [L,R=403]
|
|
RewriteRule ^downloader/ - [L,R=403]
|
|
|
|
|
|
##Forçar o uso do www
|
|
##Forçar o uso do www
|
|
#RewriteCond %{HTTP_HOST} !=""
|
|
RewriteCond %{HTTP_HOST} !=""
|
|
#RewriteCond %{HTTP_HOST} !^www\. [NC]
|
|
RewriteCond %{HTTP_HOST} !^www\. [NC]
|
|
#RewriteCond %{HTTPS}s ^on(s)|
|
|
RewriteCond %{HTTPS}s ^on(s)|
|
|
#RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
|
|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
|
|
|
|
|
|
##Reescreva as chamadas da API2 para api.php (agora é apenas REST)
|
|
##Reescreva as chamadas da API2 para api.php (agora é apenas REST)
|
|
|
|
|
... | | ... | |