User Tools

Site Tools


apache

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
apache [2010/06/18 21:40]
k2patel
apache [2020/08/10 02:35] (current)
Line 1: Line 1:
 ====== Apache Related Quick Help ====== ====== Apache Related Quick Help ======
   * [[ mod_evasive ​ | DDOS Prevention module]]   * [[ mod_evasive ​ | DDOS Prevention module]]
 +  * [[ Error Codes | HTTP Error Codes ]]
 +  * [[ mod_proxy_ajp | Jboss Load Balancing ]]
  
 ==== Compile apache from source ==== ==== Compile apache from source ====
Line 34: Line 36:
 <code bash> <code bash>
 /​srv/​www/​apache/​bin/​apxs -c -L/​usr/​local/​lib/​mysql -I/​usr/​local/​include/​mysql -lmysqlclient -lm -lz mod_auth_mysql.c /​srv/​www/​apache/​bin/​apxs -c -L/​usr/​local/​lib/​mysql -I/​usr/​local/​include/​mysql -lmysqlclient -lm -lz mod_auth_mysql.c
 +</​code>​
 +
 +Following Error is showing up when you install it with \\
 +
 +<code bash>
 +mod_auth_mysql.c:​591:​ error: syntax error before “mysql_auth_config_rec”
 +</​code>​
 +
 +<code patch>
 +http://​sourceforge.net/​tracker/​index.php?​func=detail&​aid=1437139&​group_id=60218&​atid=493464
 </​code>​ </​code>​
  
Line 157: Line 169:
 SetEnvIfNoCase User-Agent "​^Teleport"​ bad_bot SetEnvIfNoCase User-Agent "​^Teleport"​ bad_bot
 SetEnvIfNoCase User-Agent "​^EmailCollector"​ bad_bot SetEnvIfNoCase User-Agent "​^EmailCollector"​ bad_bot
 +SetEnvIfNoCase User-Agent "​^Mozilla/​4\.0\ \(compatible\)$"​ bad_bot
  
 Order Allow,Deny Order Allow,Deny
Line 171: Line 184:
 RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR]  RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR] 
 RewriteCond %{HTTP_USER_AGENT} ^Custo [OR]  RewriteCond %{HTTP_USER_AGENT} ^Custo [OR] 
 +RewriteCond %{HTTP_USER_AGENT} ^Mozilla/​4\.0\ \(compatible\) [OR]
 RewriteRule ^.* - [F,L] RewriteRule ^.* - [F,L]
 </​code>​ </​code>​
Line 222: Line 236:
 OR OR
 Check link [[lightttpd]] Check link [[lightttpd]]
- 
- 
 ==== Redirect you can use with apache / lighttpd to content ==== ==== Redirect you can use with apache / lighttpd to content ====
  
Line 231: Line 243:
 </​code>​ </​code>​
  
 +==== Redirect mobile browser ====
 +
 +This will help to redirect all mobile devices to specific page.
 +
 +<code apache>
 +RewriteEngine On
 +RewriteCond %{HTTP_USER_AGENT} (mobile|android|blackberry|brew|htc|j2me|lg|midp|mot|motorola|netfront|nokia|obigo|openweb|opera.mini|palm|psp|samsung|sanyo|sch|sonyericsson|symbian|symbos|teleca|up.browser|vodafone|wap|webos|windows.ce) [NC]
 +RewriteRule ^(.*)$ http://​ketan.lithiumfox.com/​doku.php?​do=search&​id=htaccess [R=303,L]
 +</​code>​
 +
 +Why 303 :
 +The response to the request can be found under another URI using a GET method. When received in response to a PUT,\\
 +it should be assumed that the server has received the data and the redirect should be issued with a separate GET message.
 +
 +
 +==== Disable Trace / track ====
 +
 +Mostly trace / track is risk to apache server.\\
 +
 +<code apache>
 +RewriteEngine on
 +RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
 +RewriteRule .* - [F]
 +</​code>​
apache.1276897213.txt.gz · Last modified: 2020/08/10 02:28 (external edit)