Apachedev.ru ��� ���, ��� �������� � Apache 2011-05-13T11:17:54Z Copyright 2007 ������������� <![CDATA[�������� ������� �������� � Apache]]> /?p=86 2007-10-12T01:35:20Z 2007-10-12T01:35:20Z ����������������� �������� ������� ���� CSS Styling Apache Directory Listings. ����� ���������� ��������� ������� �����. ��� ��������� �����, ������ � �������� ������ ����� ������ �������� ������ �������� ��� CMS, PHP � ���� ��� HTML (����� ���������� ������).
����������, ������ ���������� ������� �����:
��:
������� ������ Apache
�����:
������� ������ Apache (������ 2)
� ��� ��� ��� �������.
������������� ����� .htaccess ��� httpd.conf ��������� ��������� �������� (��������� Directory).
RewriteEngine Off AddType text/html .shtml AddOutputFilter INCLUDES .shtml Options Indexes Includes IndexOptions FancyIndexing SuppressHTMLPreamble XHTML IconsAreLinks FoldersFirst SuppressDescription HeaderName /files/HEADER.shtml ReadmeName /files/README.shtml
������� �� �������:
1. RewriteEngine off ��������� mod_rewrite, ����� ������ �� ������� � ��������.
2. � ������� ��������
AddType text/html .shtml AddOutputFilter INCLUDES .shtml
���������� SSI ��� ������ .shtml
3. Options Indexes Includes ��������� ������� �������� � ������������� SSI.
4. IndexOptions ���������� ���������.
4.1 FancyIndexing �������� ����������� ����������� �������� ��������.
4.2 SuppressHTMLPreamble ��������� ����� ����� html, head, title � body. �������� ��� ��� ����, ����� ���� ����������� HTML ��� ������ �����.
4.3 XHTML �������� ������������� �������� XHTML 1.0 ������ HTML 3.2. �������� � ������ Apache 2.0.49.
4.4 IconsAreLinks ������ ������ �������������.
4.5 FoldersFirst �������� ������������ ����� �������.
4.6 SuppressDescription ������� ������� Description. ��������� ������� ����� ������� �����������: SuppressLastModified, SuppressSize.
5. HeaderName /files/HEADER.shtml ������ ����, ������� ����� "�������������" ������ ��������. � ��� �� ��������� ������ �� CSS �����, AdSense �����, ���� � ������. ���� �������� ������������ �������� �������� (���� �� ���������� �� �����), ���� ������������ DocumentRoot (���� ���������� �� �����).
6. ReadmeName /files/README.shtml ���� �����, ��� � HeaderName, ������ ������� �����.
����� ��������� ��������� ����� �� ��������, ����������� ��������� IndexIgnore. ��������, IndexIgnore HEADER* README*, �������� ��� ����� ������������ � HEADERREADME.
��� Apache 1.3 ��� ��������� ����� ����� ��������� ���:
RewriteEngine Off AddType text/html .shtml AddHandler server-parsed .shtml Options Indexes Includes IndexOptions FancyIndexing SuppressHTMLPreamble IconsAreLinks FoldersFirst SuppressDescription HeaderName /files/HEADER.shtml ReadmeName /files/README.shtml
����� �������� ������ ������, ���� �������� ������, ������� ��������, ��������, ���: /var/www/icons/. ���� �� � ��� ��� ������� � ����� ��������, �� ����� ������������ ��������� AddIcon, AddIconByType � ��. ��������, AddIcon /icons/image.gif .gif .jpg .xbm ������ ������ image.gif ��� ������ � ����������� gif, jpg ��� xbm.
��� � ���. ������ ����� ������������������. �������.
]]>
������������� <![CDATA[5 ������� �������� ����������� �����]]> /?p=85 2007-09-19T17:13:05Z 2007-09-19T17:13:05Z ����������������� ������ ���� ��������� �������� �� ������ ���������� ���������� �� �����. �� ������ ��������� ����� ���������� ����. � ������ �� � ���������� �������� ������� �� "��������� Apache-a" �� ��������� ����� AskApache.com

������ ������ ������ (.css) � JavaScript ������ (.js)

���� �� ����� ������� ���������� Apache 2, �� ������ �������� ��������� ��������� � ��� ���� .htaccess, � ����� � httpd.conf:
<FilesMatch "\.(js|css)$"> SetOutputFilter DEFLATE </FilesMatch>
��������� SetOutputFilter DEFLATE ��������� ������ mod_deflate, ������� ������� �����, � �������� ��������, � ���� FilesMatch ������������ �������� ����� ������� ������ ������� jscss.
��� ������ � �����.
������ ������� �� ���������.
��� ����� ������������� FireFox ���������� ��������������� ������� FireBug + YSlow.
���������� ������������� gzip ������
��������� ������� ��� �� ����.
�����, ��� �������, ����� ������� ����� ������ ����� � ������� �� ������� ��� � ������ ����. ��� ������ �������� �� ������, �� � ������ �������� ���������, �������� ����� ���������� �����.
������ ��� ��������� ������ ������ ����������. ��� ����� ��������� �� ���� http://www.http-compression.com. �������� ������:
  • Microsoft Internet Explorer. ������������ ������ � ������ 4.0.
  • Mozilla Firefox. ������ �������������� ����� ��������. (��� ���� ����� ������������ ������� �����).
  • Netscape Navigator. ��������� ������ �������� � ������ 4.06, �� � ���������� ��������, ������� ���� ��������� � ������ 6.02.
  • Opera. ������ ��������� ������ ��������, ������� � ������ 5.12.

������������� HTTP ��������� Expires

�������, ����, js-�����, ����� ������ � ��. �������� ����� ����������� �� �����, ������� ������������, ������� � ��� ����� �� � ������ ���, ������� ����� ��������� ��� �����, ��� ��� �� ����������. ����� "�������" ������� ������������ �� ��������� ��� �����, � ����� �� �� ����, ���������� HTTP ��������� Expires. �� ������������� �����, �� �������� ������� ����� ������������ ���� �� ������������ ����.
���������: ������ ���������, ������ ��������, ���������� ����� ������-�������, ���������� ������� � �.�.
� ����� httpd.conf ��� .htaccess ����� ���������:
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"> Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT" </FilesMatch>
����� ��, ����������� ���������� ������, �� ������� ������ ���������������� �������� ���������. � ��������� ����� Thu, 15 Apr 2010 20:00:00 GMT. �.�. ����� 3 ���, �� ����� � ������ :)

��������� Cache-Control

� ������� ��������� Cache-Control ����� �������, ��� ����� ������-������� ����� ������� ����� � ����. ���������� � ��������� must-revalidate ���������� ��������� ����� �������� ETag ��� ����������� ���������.
# 480 ������ <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"> Header set Cache-Control "max-age=290304000, public" </FilesMatch>
# 2 ��� <FilesMatch "\.(xml|txt)$"> Header set Cache-Control "max-age=172800, public, must-revalidate" </FilesMatch>
# 2 ���� <FilesMatch "\.(html|htm)$"> Header set Cache-Control "max-age=7200, must-revalidate" </FilesMatch>
���� ������ � ���������� Expires
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"> Header set Cache-Control "public" Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT" </FilesMatch>

���������� ��������� ETag

�������� ETag (Entity Tag) ������������ ��� ����������� ����� ������ ����������� ������. ����� ������ �������� ������� ����, �� ��������� ��������� ETag, � ������� ���������� ��� ������������� �����.
������ ��, ��� ��������� �������, ��������� ��������� If-None-Match, �������� �������� ����� ���� ����� � ����. ���� �������� ���������, �� ������ ���������� ����� HTTP/1.1 304 Not Modified, � ���� �� ���������, ����� ���������� ����� ������ �����.
����� �������, �������� ��������� ETag � ������� ������� ��������� ���� ��������. ��� ���������� ��� ������� ������������ ������ �������� ExpiresCache-Control (���� �� �� ����������� ExpiresCache-Control �� �������� ETag!). ������� ������ ������� � ���, ��� ����� �������� � �������� �������� ���������� ������������ ��������� �������� ����� ������ (If-None-Match304 Not Modified).
���������� ��������� �������� ��������� �������:
Header unset ETag FileETag None
� ��� ������ ������ ��������� ����� �������� � �������� � �������������� ETag.
����� ������� �� ������ ������ ����� /i/yahoo.gif:
HTTP/1.1 200 OK Last-Modified: Tue, 12 Dec 2006 03:03:59 GMT ETag: "10c24bc-4ab-457e1c1f" Content-Length: 12195
��������� ������ ����� /i/yahoo.gif � ����� �������:
GET /i/yahoo.gif HTTP/1.1 Host: us.yimg.com If-Modified-Since: Tue, 12 Dec 2006 03:03:59 GMT If-None-Match: "10c24bc-4ab-457e1c1f"
HTTP/1.1 304 Not Modified

�������� ��������� Last-Modified

�������� ��������� Last-Modified ������ � ���������� ETag �������� ��������� �������� ������������� �������� �������� ����� ������ ������ If-Modified-SinceIf-None-Match. ����� ������� ����� ����� ������������ ������ �� ��������� �������� Cache-ControlExpires.
����������: �� �������� Last-ModifiedETag ��� .html ������.
�������� ��� ��������� �������:
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css)$"> Header unset Last-Modified </FilesMatch>
��� � ���. ����������� � ���������� ������������� ������ � ����������� �������� ����������� ��������� ������ ����� �������� � ��������. �������.
]]>
������������� <![CDATA[��� ��������� ���������� ������������ �� ����, ����� ���� ��� �� ��� ����������]]> /?p=84 2007-03-25T14:39:30Z 2007-03-25T14:39:30Z ����������������� ��� �� �������, ��� ������ Googlebot � ������ ��������� ����, ���� � ������, ����� ��� �������� ���������������� ��� ����, �� ������������� ��� ������, ��������, ��� ����������� �����?
�������, ��� �� �� ������� � ������ ������ ������, ��� ����� �������� � ������� �������� ������, � �� �����, ����� google �������� ���������������� ���� ��������, ��� ���, ���� google ������� ������ 404 Not Found ��� 500 - pagerank ����� �������� ����� ���������� ���� �������������.
��� ����� ��������� Googlebot � ������ ��������� �����, ��� ������ �� ��������� ��� ��������� � ������ ��, ����� ���� �������� ����/�������� �����, �������� ����� 1 ���? � ��� ������, ��� ��� �������.
503 Service Unavaliable
Google Webmaster Central Blog, All About Googlebot
���� ��� ���� �������� �������������, ��� ��� ������� Googlebot, ����� �� �������� ����� ��� ���������� �������� ��� ������� � �������?

��� ������� ��������� ��� ������ ���, ����� �� ��������� ������ 503 (network unavailable/���� ����������) ������ 200 (Ok). ��� �������� Googlebot ���������� ���������������� ���� �������� �����.

��� ������������ ��� SEO ������

����� ���������� google � ������ ��������� ����� ��������� 503 Service Temporarily Unavailable �� ����� ������������ ��� mod_rewrite � ����� .htaccess. ����� �� ����� ���������� ��������� Retry-After: 3600, ������� ������� �����, ��� �� ���������� ��������� �������� ����� ����� 3600 ������ (1 ���), ����� ��� ����� ��� ��������.

��������� Retry-After

��������� Retry-After ����� ���� ����������� � 503 ������� ������� (������ ����������) ��� �������� ������� �������, � ������� �������� ������ ����� �� � ��������� �������� �� ���������� �������. ���� ��������� ����� ����� ���� ����������� ������ � ����� 3�� (Redirection) ������� ��� �������� ������������ ������� �������, �� ��������� �������� ������ ������ ������� redirect ������. ��������� ����� ��������� ����� ���� ���� HTTP ����, ���� ����� ����� � ��������.
Retry-After = "Retry-After" ":" ( HTTP-date | delta-seconds )
��� ��� ������� �������������:
Retry-After: Fri, 31 Dec 1999 23:59:59 GMT Retry-After: 120
� ��������� ������� �������� ����� 2 �������.

�������� 503 ������ ������ ��� GoogleBot

Options +FollowSymLinks RewriteEngine On RewriteBase /
RewriteCond %{HTTP_USER_AGENT} ^.*(Googlebot|Googlebot|Mediapartners|Adsbot|Feedfetcher) -?(Google|Image)? [NC] # or RewriteCond %{HTTP_USER_AGENT} ^.*google.* [NC] RewriteRule .* /cgi-bin/error/503.php

�������� 503 ������ ���� ����� ������������

Options +FollowSymLinks RewriteEngine On RewriteBase /
RewriteCond %{REMOTE_HOST} !^1\.1\.1\.1 RewriteCond %{REQUEST_URI} !^/cgi-bin/error/503.php [NC] RewriteRule .* /cgi-bin/error/503.php

�������� ��������� ����� 503 ������, � ����������� �������� � ����������� � �������� �������

Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_USER_AGENT} ^.*(Googlebot|Googlebot|Mediapartners|Adsbot|Feedfetcher) -?(Google|Image)? [NC] RewriteCond %{REQUEST_URI} !^/cgi-bin/error/503.php [NC] RewriteRule .* /cgi-bin/error/503.php
RewriteCond %{REMOTE_HOST} !^1\.1\.1\.1 RewriteCond %{REQUEST_URI} !^/cgi-bin/error/404.php [NC] RewriteRule .* /under-development-explain.html [R=302,L]

��� ����� 503 Service Temporarily Unavailable?

503 Service Temporarily Unavailable

� ������ ������ ������ �� ����� ���������� ������ ��-�� ��������� ���������� ��� ��-�� ������������ ����� ������. ���������������, ��� ��� ��������� ���������, ������� ��������� ����� ��������� �����. ����������������� ���� �������� ����� ���� ������� � ��������� Retry-After. ���� ��������� Retry-After �� ������������, ����� ������� ���������� ���������� ���� ����� ��� 500.

��� ������� ��� ������ 503 ������

PHP

���� �� ����������� CGI ������ PHP, ����� ��� ���������� ���������� ��������� Status ������������� � HTTP/1.1, � ���� �� ����������� mod_php, ����� Status ���������� �� ����.
<?php ob_start(); header('HTTP/1.1 503 Service Temporarily Unavailable'); header('Status: 503 Service Temporarily Unavailable'); header('Retry-After: 3600'); header('X-Powered-By:'); ?><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>503 Service Temporarily Unavailable</title> </head><body> <h1>Service Temporarily Unavailable</h1> <p>The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.</p> </body></html>
Perl CGI
#!/usr/local/bin/perl
print "Status: 503 Service Temporarily Unavailable\n"; print "Content-Type: text/html; charset=UTF-8;\n"; print "Retry-After: 3600\r\n\r\n";
print "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n <title>503 Service Temporarily Unavailable</title>\n"; print "</head><body>\n <h1>Service Temporarily Unavailable</h1>\n<p>The server is temporarily unable to service your\n"; print "request due to maintenance downtime or capacity\n problems. Please try again later.</p>\n</body></html>";

��� ����� ������ "������������ URL"?

������������ URL
Google ������������� ����� ������, ����� �� ����� �������� ������ � ��������. ������ �������� ���������, ��������, ������ DNS ��� ���������� ��������. ��� ������ ����� ���� ���������� ��� �����, ����� �� �������� �������� ��������. ��� ������ ������ ������ ������������� URL:
��������: AskApache.com
�������: ApacheDev.ru
]]>
������������� <![CDATA[��� ���� ������ Apache2 ��� Microsoft Windows]]> /?p=83 2007-03-24T13:00:55Z 2007-03-24T13:00:55Z ���������� ������� ������� ���� ���������� ��� ������ �������� ����� ApacheDev.ru, � ������� ������� ��� ������ ���� � ������������ ��������� ������ Apache 2. ������ ����� ��������� � ������ ������� �������� � ������� ���������� �������, ��� ��� � ��� �������� ���������� ������� �������� ������ Apache ��� �� Windows � ������� Microsoft Visual C++ .NET. ��������� ������.
� ���� ������ � ��������� �������� �� ���� ������, ������� ���� ����� ��������� �� ��� ����� � �������, ������� � ������, �.�. ���������� ����� ������ �� �������� �����������.
��� ����� � ������ � ��������� Apache2 (apache_2.2.4-win32-x86-no_ssl.msi).
� ���������� \modules ���������� ����������� ����� �������, ����� ������� ����� ���������� *.so (��������� � ����, � unix-�������� �� ����� ���������� ������ ����� ����������� ������ � �������� �����, ������ ����� � ������� elf).
��� �� ���� ����� �� ������������ �������� ���� �������� �������.

������������ ������ Apache2

������������ ��������� � httpd-2.2.4\modules, � ���� ��� �����.
�������, ��� ����� ��� ���� ������� ��� ���:
module AP_MODULE_DECLARE_DATA logio_module; ... module AP_MODULE_DECLARE_DATA logio_module = { STANDARD20_MODULE_STUFF, NULL, /* create per-dir config */ NULL, /* merge per-dir config */ NULL, /* server config */ NULL, /* merge server config */ NULL, /* command apr_table_t */ register_hooks /* register hooks */ };
��� register_hooks ������� ��������� ������, ������� ������������ ������� ��������� ������, ���������� ��� ������������ ��������, ��� ������, ������� ��������� ����� ������ �����
�� ��� �������� ��������������, ��� ��������� ��������� (��������� �������) Apache2? ��� ������������� ������? � ������ ������ ������� �������� ������.
�������, ��� ���� ������ ���������� ������ ��� Apache2 (��� ������� mod_status.so) � ��� ���������� ����������, ����������� ������������� ������� IDA Pro.
��������, ��� ������ mod_status.so �� ��� ���� ��� DLL, � ������� ������������ ������: ���������, ������, ����, �������� (��� ���������� � ���������� ������, ������� ����� �� ������� 1) �������, ��������.
������ DLL ������ Apache
������� 1. �������� mod_status.so
����� ����� ��� ������ � ��� ����� �����, �������� � �����, ��� ��� ��� ������� �� ����� ���������� ����� ������.
����, � DLL mod_status.so ���� ����� ����� DllMain (�� ����� ���� ��� �� ��������� ����� ����� ����� ������, ��� ��� � ��� ������������ CRT � �������� ����� ����� �������� __CRT_INIT, ��� ��� ����� � ��� ��� ������ �����-���� ����� �������� � �����)
� ��� �� ���������� DllMain � ������ ������?
�� ���������� �����:
������ Apache � ����� ������ IDA
������� 2. ������ Apache2 � ����� ������ IDA
��� ����� ����� ���������� ��� ��������:
  • �������� ��������� ���� DLL (DLL_PROCESS_ATTACH),
  • �������� DLL ��������� (DLL_PROCESS_DETACH),
  • �������� ��������� ������ ������ (DLL_THREAD_ATTACH),
  • ����������� ������ ��������� (DLL_THREAD_DETACH)
����� DisableThreadLibraryCalls() ��������� ����� DllMain ��� �������� ��������� � ��������� � ��������� ������� ���������. ������� ��� ��� �����������.
���������� ������ �������, ���������� ���, ������ ���������� ����������� ������� ��:
  • KERNEL32.DLL
  • MSVCRT.DLL
  • LIBAPR-1.DLL
  • LIBAPRUTILS-1.DLL
  • LIBHTTPD.DLL
��� ��� �� ����������, � �����, �������� ��������.
�������������� ������ �������� ���� ��� ���: ������ ������ ������������ ����� ���������� name_module, ��� name � ��� ������, �������� status_module
� ��� ���������� � ��������� �� ��������� module, ������������ � ����� http_config.h:
/** * Module structures. Just about everything is dispatched through * these, directly or indirectly (through the command and handler * tables). */ typedef struct module_struct module; struct module_struct { /** API version, *not* module version; check that module is * compatible with this version of the server. */ int version; /** API minor version. Provides API feature milestones. Not checked * during module init */ int minor_version; /** Index to this modules structures in config vectors. */ int module_index; /** The name of the module's C file */ const char *name; /** The handle for the DSO. Internal use only */ void *dynamic_load_handle; /** A pointer to the next module in the list * @defvar module_struct *next */ struct module_struct *next; /** Magic Cookie to identify a module structure; It's mainly * important for the DSO facility (see also mod_so). */ unsigned long magic; /** Function to allow MPMs to re-write command line arguments. This * hook is only available to MPMs. * @param The process that the server is running in. */ void (*rewrite_args) (process_rec *process); /** Function to allow all modules to create per directory configuration * structures. * @param p The pool to use for all allocations. * @param dir The directory currently being processed. * @return The per-directory structure created */ void *(*create_dir_config) (apr_pool_t *p, char *dir); /** Function to allow all modules to merge the per directory configuration * structures for two directories. * @param p The pool to use for all allocations. * @param base_conf The directory structure created for the parent directory. * @param new_conf The directory structure currently being processed. * @return The new per-directory structure created */ void *(*merge_dir_config) (apr_pool_t *p, void *base_conf, void *new_conf); /** Function to allow all modules to create per server configuration * structures. * @param p The pool to use for all allocations. * @param s The server currently being processed. * @return The per-server structure created */ void *(*create_server_config) (apr_pool_t *p, server_rec *s); /** Function to allow all modules to merge the per server configuration * structures for two servers. * @param p The pool to use for all allocations. * @param base_conf The directory structure created for the parent directory. * @param new_conf The directory structure currently being processed. * @return The new per-directory structure created */ void *(*merge_server_config) (apr_pool_t *p, void *base_conf, void *new_conf); /** A command_rec table that describes all of the directives this module * defines. */ const command_rec *cmds;
/** A hook to allow modules to hook other points in the request processing. * In this function, modules should call the ap_hook_*() functions to * register an interest in a specific step in processing the current * request. * @param p the pool to use for all allocations */ void (*register_hooks) (apr_pool_t *p);
������ �������� ����, ��� �������� ������:
Apache �� ����� httpd.conf, �������� ������ ���� LoadModule actions_module modules/mod_actions.so, ��� modules/mod_actions.so � ���� � ������, � actions_module � ��� �������������� ������� mod_actions.so ����������, � ������� ���������� ��������� module, �� � ����� ����� ��� �������.
�������� �����:
������ ��� Apache2 ��� Microsoft Windows � ��� DLL, �������������� ��������� �� ���������� ���� module, ��������� �����������, ������ ����� ������������ ������� �� DLL:
  • LIBAPR-1.DLL
  • LIBAPRUTILS-1.DLL
  • LIBHTTPD.DLL
������� ������������� �� ����������.

�������� ������ Apache2 � ������� Microsoft Visual C++ .NET

�� ������ ������ ������, ������� ����� ������� � ������� Microsoft Visual C++ .NET:
1.������� ����� ������:
����� ������ ��� ������ Apache 2
������� 3. ����� ������ ��� ������ Apache 2
����� ��� ���������� �� �������, �� ����� ��������, ������ ��� ��� DLL. �� �������� ���-�� ����, ������� �������� Console. ����� ���������:
�������� ��� ���������� ��� ������ Apache 2
������� 4. �������� ��� ���������� ��� ������
2. ����� ��������� ����� ����, ��� ����� ����������� �������� ���:
��������� ����� ����������
������� 5. ��������� ����� ����������
����� ��������� ��� �������� ��� � ���.
3. ����������� ��������� ������:
��������� ���������� �����:
��������� ���������� �����
������� 6. ��������� ���������� �����
�������, ��� ��������� DLL, ������������ ���� �������:
��������� ������������� ����������
������� 7. ��������� ������������� ����������
��� �� ����� ������� ���������� ������������ �����:
��������� ���������� ������������ �����
������� 8. ��������� ���������� ������������ �����
���� �� ������� cpp ����, �� ������� ������� �����������, ��� ��� ����� ������������� ��� c-����:
������������� ��������� ������
������� 9. ������������� ��������� ������
� �������� ������
������ ���������� ������ ������ ������, ��� ���������� �������� ��� ���������� ������� ���� � ���������� ������ � ����������� ����������� ��������.
�����: unknow [regiomontanus(at)mail(dot)ru]
��������: ApacheDev.ru
]]>
������������� <![CDATA[����� '����������������� Web-������� Apache']]> /?p=82 2007-03-18T10:57:35Z 2007-03-18T10:57:35Z ����� ����������������� Web-������� Apache � ����������� �� ����������� ���������
��� ����� ������������ ��� ���������� ������ ���������� ����������� �� Web-������� Apache. ���������� � ��� �������� ������������ ������������ ������� ������������ �����������, �� ������ ������� ���������� ��� ���� �� ���������. �������� �� ��, ��� �������� ������������ ����� ����� � ������� ����������� ���������, � ����������� ��������� ����� ������������� �������� � ����������, ����������� ��� �������� � ���������������� Web-�������. ��� �������� ������������ ���� � IP-�������, ������ ��������� ���/I� � ��������� ���������� ���������. ����� ����, � ����������� Web-����������������� ��������� ���� �������� ������� ����������� �������� � �������������� � ������ ������.

����������������� Web-������� Apache � ����������� �� ����������� ���������
������������: �������, 2001 �.
������ �������, 336 ���.
ISBN 5-8459-0212-6
�����: 5000 ���.
����: �������.

����������

�����������
����� 1. ������
����� 1. �������� ���������
����� 2. ����������� Web-������� Apache
����� 3. ���������������� Web-������� Apache
����� 4. ������, ���������� � ��������� �������
����� 2. ����������������� Web-�������
����� 5. ������� ���������� ���-�����
����� 6. Proxy-������� � �����������
����� 7. ����������� � ����������
����� 8. ������������
����� 9. ������������ Web-��������
����� 10. ��������� ������� ������������� �������
����� 11. �������������� ������
����� 12. ������ ������
����� 3. ����������� ���������
����� 13. �������� �������
����� 14. �������������� � ������ ������
����� 15. ������ ������������� ����
����� 4. ����������
���������� �. �������� ���������
���������� �. ������ ���������
���������� �. ��������� ��������� TCP/IP
���������� �. �������������� ���� � IP-������
���������� �. ������� �������, ����������� ��� ������ ����
���������� �. ��������� UNIX
���������� �. ��������� Windows NT
���������� �. ���� ��������� HTTP
���������� �. ���������� ���������
���������� �. ��������� mod_perl API
���������� �. ��������� ����� PHP
���������� ���������
������ � Ozon.ru (196 �.) ������ � Bolero.ru (121 �.)
������� � ApacheDev.ru (pdf)
]]>
������������� <![CDATA[��������� ����������� URL]]> /?p=81 2007-02-27T20:58:44Z 2007-02-27T20:58:44Z ����������������� ������ ���������� ��� �������������� ������������ URL � �����������.
��������� �� ��������� � �������� ��������� ������ ������� ��������� ���
�������������
������: http://my-domain.com/index.php?par1=user&par2=45
������ �������������� ����� ������ � ������:
"mod_rewrite. �������������� ������������ URL � �����������"
������������ ���������
�������� �������
RewriteEngine On: FollowSymLinks:
�������: �������:
����������� / (����) - (�����) _ (������ �������������)
���������
]]>
������������� <![CDATA[5 ������ ���������� Firefox ��� ���-������������]]> /?p=80 2007-02-20T22:35:18Z 2007-02-20T22:35:18Z ������ � ��� ��� ��� �� ���� �������� ������� Firefox �� ��������� ���� �� ������� ����� ����� �� ��������� �����. ���� �� ���������� ����� marketshare.hitslink.com, ������ 80% ����� ����������, ��� Inernet Explorer - ������, 13% - ��� ����� Firefox ������ �� ����������, �� � ���������� 7% ����� ������������ Opera, Safari � ��������� �������� ��� "����������� ����������� ������� � ���������".
� ������ ����� ���-������������� - ������ ������! ������ ��� ��� �����, ��� ������ ������� - ��� Firefox.
� ����� �����, ������ ��� ����� ��� �� �������� ������ ������������� ����������� ��� �� ������ � ������.
� ������� ����� �� ������� � ����� ��������, ������� � ��� ����������� (Add-ons). �������� ������ ��������� ���-������������, ����� �� ��, ��� ����� Firebug ��� WebDeveloper � ������ �������, ��� �� ������� �������������, ������ ��� ��� ���� �������� ������������ ������ ����������� ����������� ������� ���������� ���-���������.
�� ���� ���������� �� ����������� � �������� ���������� � ���� ������������ ������, ������� ��������� � ���������. � ����� � � Firebug.

Firebug

������ ����� ��������� ������������ ���� (���� ��� ���� ���� �� > 1 ������), ������� �� �� ������ � ����������� �� ������� ��������� ���� ��� Web 2.0. ��� ����� ����� ����� ���������� ��������� Digg-�, del.icio.us, YouTube � ������ "����������" ��������.
� � ������, ��� �� ��������� ���� � �������� ����� "�����������" ������ - Firebug. ������ ��� ������ �� ���� ������������ ������������� ������� ����� ��� ������ � JavaScript(+Ajax), CSS, DOM.
Firebug
���������������� Firebug ������������� ����������.
  • ������ � �������������� HTML
  • ������ � CSS (��������������, ������������ � ��.)
  • ������ �������� �������
  • ������� JavaScript
  • ������ � DOM
� ��� ��� � ����� ������� �����! ������� DOM ���������� � ����� �� ������.

WebDeveloper

��������� ����������� ��� ���-������������. ���� �� ������ ��� ����� � ��������� �������� ����, �� WebDeveloper �������� ��� ��� ������ ����� � ������.
Webdeveloper
Webdeveloper
���, ��� �� �����:
  • ������ � cookies (��������, ��������� � ��������)
  • ������ �� ������� CSS (����� �� - ��������, ���������, � ����� ������� ������ ������ ��� ���������, ��� � ��.)
  • ��������� ���� � ������� (�������� ���������, ��������� ������ �������� ������, ��������� ������������ ����� � ��.)
  • ������ � ������������� ������� (����������, ����� �������� � ������� � ��.)
  • ������ ���������
  • ������������ ��������� ���������� ���������
� �����, ���� ������ ������ ������������ ���� ������� ����� ������� ������ ����� ���� ���� ������ �������.

HTML Validator

���� �� ������ ��������� �������� HTML �������� (� ����� �������, ��� ������ ����� �� � ������ ���������), �� HTML Validator �������� ���� ������� ������ �� ����������. �� �� ������ �������, ��� �� ��������, �� ����� ��������, ��� ��� ������ ���������. ���������� �� �������� � ���� ��� �������.
HTML validator

Live HTTP Headers

��� ��� ���� �� ��������. ��������� ������������� HTTP ���������, ������������ � ���������� �� �������. ���, ��� ��� � ������������ ��� ������� Apache, ������ ������ �������� ������. �� ��� �� ������� ���� � ������� ����� � ������ ������� ��� ������ � ������������ Apache.
�������� ����� �������� ��� ����������� � �������� GET � POST ��������. �� Curl �������, �� ��� ����� ������.
Live HTTP Headers

User Agent Switcher

�� � ��������� � ����������� ������ ����� User Agent Switcher. ��� ��� ������, �� �� ������. ��������� 2-�� ��������� ���� �� ������ User Agent Switcher ������ User-Agent ������ ��������. �������� � ����� ������ ��� Nokia6630, �� ���� �������� Philips :). ��� �� ��� ������, ���� ����� ��������� ����������� ���������� ��� ��������� HTTP ��������.
Live HTTP Headers
]]>
������������� <![CDATA[������ �� ����� � ������������ � ������� Apache]]> /?p=79 2007-02-09T12:24:51Z 2007-02-09T12:24:51Z ������������ ����� �� ����� ������� ������� ����������� ���������� ������ �������� ���� � ������������. ����� ��� ����� ������������ ��� "����������������" ��������� ����������� ��������� ��������. � ����� ������������ ����������� ���������� ������ �� ����� �������, ��� ����������� ��� ������ ����� ��� �����������.
�� ���� �������� ����� ���������� � ������� ������������ ������������, �� ����� ���� ����� �������� � �� ������� �������������, �� � ����� ����� �� ����� �������.
���� ��������� ��������, ����������� ��������� ���������� �������� ������������. ������� �������� ���� ���� ���� ������� � ������ Fight Blog Spam with Apache. ���� � �� � �������.
������ ���������� ������ � ���������� �� ������ ���������� ��� ���������, � "��������" �� ��� ���� ��������.
��������: http://www.webmasterworld.com/
## .htaccess ��������� ## ���������� "������" ����� �� User-Agent SetEnvIfNoCase User-Agent ^$ bad_bot SetEnvIfNoCase User-Agent "^AESOP_com_SpiderMan" bad_bot SetEnvIfNoCase User-Agent "^Alexibot" bad_bot SetEnvIfNoCase User-Agent "Anonymouse.org" bad_bot SetEnvIfNoCase User-Agent "^asterias" bad_bot SetEnvIfNoCase User-Agent "^attach" bad_bot SetEnvIfNoCase User-Agent "^BackDoorBot" bad_bot SetEnvIfNoCase User-Agent "^BackWeb" bad_bot SetEnvIfNoCase User-Agent "Bandit" bad_bot SetEnvIfNoCase User-Agent "^Baiduspider" bad_bot SetEnvIfNoCase User-Agent "^BatchFTP" bad_bot SetEnvIfNoCase User-Agent "^Bigfoot" bad_bot SetEnvIfNoCase User-Agent "^Black.Hole" bad_bot SetEnvIfNoCase User-Agent "^BlackWidow" bad_bot SetEnvIfNoCase User-Agent "^BlowFish" bad_bot SetEnvIfNoCase User-Agent "^Bot mailto:craftbot@yahoo.com" bad_bot SetEnvIfNoCase User-Agent "^BotALot" bad_bot SetEnvIfNoCase User-Agent "Buddy" bad_bot SetEnvIfNoCase User-Agent "^BuiltBotTough" bad_bot SetEnvIfNoCase User-Agent "^Bullseye" bad_bot SetEnvIfNoCase User-Agent "^BunnySlippers" bad_bot SetEnvIfNoCase User-Agent "^Cegbfeieh" bad_bot SetEnvIfNoCase User-Agent "^CheeseBot" bad_bot SetEnvIfNoCase User-Agent "^CherryPicker" bad_bot SetEnvIfNoCase User-Agent "^ChinaClaw" bad_bot SetEnvIfNoCase User-Agent "Collector" bad_bot SetEnvIfNoCase User-Agent "Copier" bad_bot SetEnvIfNoCase User-Agent "^CopyRightCheck" bad_bot SetEnvIfNoCase User-Agent "^cosmos" bad_bot SetEnvIfNoCase User-Agent "^Crescent" bad_bot SetEnvIfNoCase User-Agent "^Curl" bad_bot SetEnvIfNoCase User-Agent "^Custo" bad_bot SetEnvIfNoCase User-Agent "^DA" bad_bot SetEnvIfNoCase User-Agent "^DISCo" bad_bot SetEnvIfNoCase User-Agent "^DIIbot" bad_bot SetEnvIfNoCase User-Agent "^DittoSpyder" bad_bot SetEnvIfNoCase User-Agent "^Download" bad_bot SetEnvIfNoCase User-Agent "^Download Demon" bad_bot SetEnvIfNoCase User-Agent "^Download Devil" bad_bot SetEnvIfNoCase User-Agent "^Download Wonder" bad_bot SetEnvIfNoCase User-Agent "Downloader" bad_bot SetEnvIfNoCase User-Agent "^dragonfly" bad_bot SetEnvIfNoCase User-Agent "^Drip" bad_bot SetEnvIfNoCase User-Agent "^eCatch" bad_bot SetEnvIfNoCase User-Agent "^EasyDL" bad_bot SetEnvIfNoCase User-Agent "^ebingbong" bad_bot SetEnvIfNoCase User-Agent "^EirGrabber" bad_bot SetEnvIfNoCase User-Agent "^EmailCollector" bad_bot SetEnvIfNoCase User-Agent "^EmailSiphon" bad_bot SetEnvIfNoCase User-Agent "^EmailWolf" bad_bot SetEnvIfNoCase User-Agent "^EroCrawler" bad_bot SetEnvIfNoCase User-Agent "^Exabot" bad_bot SetEnvIfNoCase User-Agent "^Express WebPictures" bad_bot SetEnvIfNoCase User-Agent "Extractor" bad_bot SetEnvIfNoCase User-Agent "^EyeNetIE" bad_bot SetEnvIfNoCase User-Agent "^FileHound" bad_bot SetEnvIfNoCase User-Agent "^FlashGet" bad_bot SetEnvIfNoCase User-Agent "^Foobot" bad_bot SetEnvIfNoCase User-Agent "^flunky" bad_bot SetEnvIfNoCase User-Agent "^FrontPage" bad_bot SetEnvIfNoCase User-Agent "^GetRight" bad_bot SetEnvIfNoCase User-Agent "^GetSmart" bad_bot SetEnvIfNoCase User-Agent "^GetWeb!" bad_bot SetEnvIfNoCase User-Agent "^Go!Zilla" bad_bot SetEnvIfNoCase User-Agent "Google Wireless Transcoder" bad_bot SetEnvIfNoCase User-Agent "^Go-Ahead-Got-It" bad_bot SetEnvIfNoCase User-Agent "^gotit" bad_bot SetEnvIfNoCase User-Agent "Grabber" bad_bot SetEnvIfNoCase User-Agent "^GrabNet" bad_bot SetEnvIfNoCase User-Agent "^Grafula" bad_bot SetEnvIfNoCase User-Agent "^Harvest" bad_bot SetEnvIfNoCase User-Agent "^hloader" bad_bot SetEnvIfNoCase User-Agent "^HMView" bad_bot SetEnvIfNoCase User-Agent "^httplib" bad_bot SetEnvIfNoCase User-Agent "^HTTrack" bad_bot SetEnvIfNoCase User-Agent "^humanlinks" bad_bot SetEnvIfNoCase User-Agent "^ia_archiver" bad_bot SetEnvIfNoCase User-Agent "^IlseBot" bad_bot SetEnvIfNoCase User-Agent "^Image Stripper" bad_bot SetEnvIfNoCase User-Agent "^Image Sucker" bad_bot SetEnvIfNoCase User-Agent "Indy Library" bad_bot SetEnvIfNoCase User-Agent "^InfoNaviRobot" bad_bot SetEnvIfNoCase User-Agent "^InfoTekies" bad_bot SetEnvIfNoCase User-Agent "^Intelliseek" bad_bot SetEnvIfNoCase User-Agent "^InterGET" bad_bot SetEnvIfNoCase User-Agent "^Internet Ninja" bad_bot SetEnvIfNoCase User-Agent "^Iria" bad_bot SetEnvIfNoCase User-Agent "^Jakarta" bad_bot SetEnvIfNoCase User-Agent "^JennyBot" bad_bot SetEnvIfNoCase User-Agent "^JetCar" bad_bot SetEnvIfNoCase User-Agent "^JOC" bad_bot SetEnvIfNoCase User-Agent "^JustView" bad_bot SetEnvIfNoCase User-Agent "^Jyxobot" bad_bot SetEnvIfNoCase User-Agent "^Kenjin.Spider" bad_bot SetEnvIfNoCase User-Agent "^Keyword.Density" bad_bot SetEnvIfNoCase User-Agent "^larbin" bad_bot SetEnvIfNoCase User-Agent "^LeechFTP" bad_bot SetEnvIfNoCase User-Agent "^LexiBot" bad_bot SetEnvIfNoCase User-Agent "^lftp" bad_bot SetEnvIfNoCase User-Agent "^libWeb/clsHTTP" bad_bot SetEnvIfNoCase User-Agent "^likse" bad_bot SetEnvIfNoCase User-Agent "^LinkextractorPro" bad_bot SetEnvIfNoCase User-Agent "^LinkScan/8.1a.Unix" bad_bo SetEnvIfNoCase User-Agent "^LNSpiderguy" bad_bott SetEnvIfNoCase User-Agent "^LinkWalker" bad_bot SetEnvIfNoCase User-Agent "^lwp-trivial" bad_bot SetEnvIfNoCase User-Agent "^LWP::Simple" bad_bot SetEnvIfNoCase User-Agent "^Magnet" bad_bot SetEnvIfNoCase User-Agent "^Mag-Net" bad_bot SetEnvIfNoCase User-Agent "^MarkWatch" bad_bot SetEnvIfNoCase User-Agent "^Mass Downloader" bad_bot SetEnvIfNoCase User-Agent "^Mata.Hari" bad_bot SetEnvIfNoCase User-Agent "^Memo" bad_bot SetEnvIfNoCase User-Agent "^Microsoft.URL" bad_bot SetEnvIfNoCase User-Agent "^Microsoft URL Control" bad_bot SetEnvIfNoCase User-Agent "^MIDown tool" bad_bot SetEnvIfNoCase User-Agent "^MIIxpc" bad_bot SetEnvIfNoCase User-Agent "^Mirror" bad_bot SetEnvIfNoCase User-Agent "^Missigua Locator" bad_bot SetEnvIfNoCase User-Agent "^Mister PiX" bad_bot SetEnvIfNoCase User-Agent "^moget" bad_bot SetEnvIfNoCase User-Agent "^Mozilla/3.Mozilla/2.01" bad_bot SetEnvIfNoCase User-Agent "^Mozilla.*NEWT" bad_bot SetEnvIfNoCase User-Agent "^NAMEPROTECT" bad_bot SetEnvIfNoCase User-Agent "^Navroad" bad_bot SetEnvIfNoCase User-Agent "^NearSite" bad_bot SetEnvIfNoCase User-Agent "^NetAnts" bad_bot SetEnvIfNoCase User-Agent "^Netcraft" bad_bot SetEnvIfNoCase User-Agent "^NetMechanic" bad_bot SetEnvIfNoCase User-Agent "^NetSpider" bad_bot SetEnvIfNoCase User-Agent "^Net Vampire" bad_bot SetEnvIfNoCase User-Agent "^NetZIP" bad_bot SetEnvIfNoCase User-Agent "^NextGenSearchBot" bad_bot SetEnvIfNoCase User-Agent "^NG" bad_bot SetEnvIfNoCase User-Agent "^NICErsPRO" bad_bot SetEnvIfNoCase User-Agent "^NimbleCrawler" bad_bot SetEnvIfNoCase User-Agent "^Ninja" bad_bot SetEnvIfNoCase User-Agent "^NPbot" bad_bot SetEnvIfNoCase User-Agent "^Octopus" bad_bot SetEnvIfNoCase User-Agent "^Offline Explorer" bad_bot SetEnvIfNoCase User-Agent "^Offline Navigator" bad_bot SetEnvIfNoCase User-Agent "^Openfind" bad_bot SetEnvIfNoCase User-Agent "^OutfoxBot" bad_bot SetEnvIfNoCase User-Agent "^PageGrabber" bad_bot SetEnvIfNoCase User-Agent "^Papa Foto" bad_bot SetEnvIfNoCase User-Agent "^pavuk" bad_bot SetEnvIfNoCase User-Agent "^pcBrowser" bad_bot SetEnvIfNoCase User-Agent "^PHP version tracker" bad_bot SetEnvIfNoCase User-Agent "^Pockey" bad_bot SetEnvIfNoCase User-Agent "^ProPowerBot/2.14" bad_bot SetEnvIfNoCase User-Agent "^ProWebWalker" bad_bot SetEnvIfNoCase User-Agent "^psbot" bad_bot SetEnvIfNoCase User-Agent "^Pump" bad_bot SetEnvIfNoCase User-Agent "^QueryN.Metasearch" bad_bot SetEnvIfNoCase User-Agent "^RealDownload" bad_bot SetEnvIfNoCase User-Agent "Reaper" bad_bot SetEnvIfNoCase User-Agent "Recorder" bad_bot SetEnvIfNoCase User-Agent "^ReGet" bad_bot SetEnvIfNoCase User-Agent "^RepoMonkey" bad_bot SetEnvIfNoCase User-Agent "^RMA" bad_bot SetEnvIfNoCase User-Agent "Siphon" bad_bot SetEnvIfNoCase User-Agent "sitecheck.internetseer.com" bad_bot SetEnvIfNoCase User-Agent "^SiteSnagger" bad_bot SetEnvIfNoCase User-Agent "^SlySearch" bad_bot SetEnvIfNoCase User-Agent "^SmartDownload" bad_bot SetEnvIfNoCase User-Agent "^Snake" bad_bot SetEnvIfNoCase User-Agent "^Snapbot" bad_bot SetEnvIfNoCase User-Agent "^Snoopy" bad_bot SetEnvIfNoCase User-Agent "^sogou" bad_bot SetEnvIfNoCase User-Agent "^SpaceBison" bad_bot SetEnvIfNoCase User-Agent "^SpankBot" bad_bot SetEnvIfNoCase User-Agent "^spanner" bad_bot SetEnvIfNoCase User-Agent "^Sqworm" bad_bot SetEnvIfNoCase User-Agent "Stripper" bad_bot SetEnvIfNoCase User-Agent "Sucker" bad_bot SetEnvIfNoCase User-Agent "^SuperBot" bad_bot SetEnvIfNoCase User-Agent "^SuperHTTP" bad_bot SetEnvIfNoCase User-Agent "^Surfbot" bad_bot SetEnvIfNoCase User-Agent "^suzuran" bad_bot SetEnvIfNoCase User-Agent "^Szukacz/1.4" bad_bot SetEnvIfNoCase User-Agent "^tAkeOut" bad_bot SetEnvIfNoCase User-Agent "^Teleport" bad_bot SetEnvIfNoCase User-Agent "^Telesoft" bad_bot SetEnvIfNoCase User-Agent "^TurnitinBot/1.5" bad_bot SetEnvIfNoCase User-Agent "^The.Intraformant" bad_bot SetEnvIfNoCase User-Agent "^TheNomad" bad_bot SetEnvIfNoCase User-Agent "^TightTwatBot" bad_bot SetEnvIfNoCase User-Agent "^Titan" bad_bot SetEnvIfNoCase User-Agent "^toCrawl/UrlDispatcher" bad_bot SetEnvIfNoCase User-Agent "^True_Robot" bad_bot SetEnvIfNoCase User-Agent "^turingos" bad_bot SetEnvIfNoCase User-Agent "^TurnitinBot" bad_bot SetEnvIfNoCase User-Agent "^URLy.Warning" bad_bot SetEnvIfNoCase User-Agent "^Vacuum" bad_bot SetEnvIfNoCase User-Agent "^VCI" bad_bot SetEnvIfNoCase User-Agent "^VoidEYE" bad_bot SetEnvIfNoCase User-Agent "^Web Image Collector" bad_bot SetEnvIfNoCase User-Agent "^Web Sucker" bad_bot SetEnvIfNoCase User-Agent "^WebAuto" bad_bot SetEnvIfNoCase User-Agent "^WebBandit" bad_bot SetEnvIfNoCase User-Agent "^Webclipping.com" bad_bot SetEnvIfNoCase User-Agent "^WebCopier" bad_bot SetEnvIfNoCase User-Agent "^WebEMailExtrac.*" bad_bot SetEnvIfNoCase User-Agent "^WebEnhancer" bad_bot SetEnvIfNoCase User-Agent "^WebFetch" bad_bot SetEnvIfNoCase User-Agent "^WebGo IS" bad_bot SetEnvIfNoCase User-Agent "^Web.Image.Collector" bad_bot SetEnvIfNoCase User-Agent "^WebLeacher" bad_bot SetEnvIfNoCase User-Agent "^WebmasterWorldForumBot" bad_bot SetEnvIfNoCase User-Agent "^WebReaper" bad_bot SetEnvIfNoCase User-Agent "^WebSauger" bad_bot SetEnvIfNoCase User-Agent "^WebSite" bad_bot SetEnvIfNoCase User-Agent "^Website eXtractor" bad_bot SetEnvIfNoCase User-Agent "^Website Quester" bad_bot SetEnvIfNoCase User-Agent "^Webster" bad_bot SetEnvIfNoCase User-Agent "^WebStripper" bad_bot SetEnvIfNoCase User-Agent "^WebWhacker" bad_bot SetEnvIfNoCase User-Agent "^WebZIP" bad_bot SetEnvIfNoCase User-Agent "^Wget" bad_bot SetEnvIfNoCase User-Agent "Whacker" bad_bot SetEnvIfNoCase User-Agent "^Widow" bad_bot SetEnvIfNoCase User-Agent "^WISENutbot" bad_bot SetEnvIfNoCase User-Agent "^WWWOFFLE" bad_bot SetEnvIfNoCase User-Agent "^WWW-Collector-E" bad_bot SetEnvIfNoCase User-Agent "^Xaldon" bad_bot SetEnvIfNoCase User-Agent "^Xenu" bad_bot SetEnvIfNoCase User-Agent "^Zeus" bad_bot SetEnvIfNoCase User-Agent "^Zyborg" bad_bot <Limit GET POST HEAD> Order Allow,Deny Allow from all Deny from env=bad_bot </Limit>
SetEnvIfNoCase User-Agent "^Web Image Collector" bad_bot SetEnvIfNoCase User-Agent "^Web Sucker" bad_bot SetEnvIfNoCase User-Agent "^WebAuto" bad_bot SetEnvIfNoCase User-Agent "^WebBandit" bad_bot SetEnvIfNoCase User-Agent "^Webclipping.com" bad_bot SetEnvIfNoCase User-Agent "^WebCopier" bad_bot SetEnvIfNoCase User-Agent "^WebEMailExtrac.*" bad_bot SetEnvIfNoCase User-Agent "^WebEnhancer" bad_bot SetEnvIfNoCase User-Agent "^WebFetch" bad_bot SetEnvIfNoCase User-Agent "^WebGo IS" bad_bot SetEnvIfNoCase User-Agent "^Web.Image.Collector" bad_bot SetEnvIfNoCase User-Agent "^WebLeacher" bad_bot SetEnvIfNoCase User-Agent "^WebmasterWorldForumBot" bad_bot SetEnvIfNoCase User-Agent "^WebReaper" bad_bot SetEnvIfNoCase User-Agent "^WebSauger" bad_bot SetEnvIfNoCase User-Agent "^WebSite" bad_bot SetEnvIfNoCase User-Agent "^Website eXtractor" bad_bot SetEnvIfNoCase User-Agent "^Website Quester" bad_bot SetEnvIfNoCase User-Agent "^Webster" bad_bot SetEnvIfNoCase User-Agent "^WebStripper" bad_bot SetEnvIfNoCase User-Agent "^WebWhacker" bad_bot SetEnvIfNoCase User-Agent "^WebZIP" bad_bot
�� ������ ������ ��� 21 ������ � ���� ��������� ����������:
SetEnvIfNoCase User-Agent ^Web bad_bot
�����, ���� ������� ��������� ������:
RewriteCond %{HTTP:VIA} ^.+pinappleproxy [NC] RewriteRule .* - [F]
�� ��� ����� ������� ������� ���������� ��������.

�������� ���� � .htaccess

��� �� IP

�������� �� ������ ����������� �������, ������� ���������� ��������� ip:
deny from 192.168.0.1

���������� ������� ��� �������� ��� ��������� Referrer

����� ���� ���������� ��������� ����������, ��� ����������� ���� wp-comments-post.php. ��� ���� ������� ������������ ���������� ������� ��������� Referrer. ����� ����������� �������� �������� ����-����, ��� ���������� � ������� ��������, ��� Referrer. ��� ��������� ���������� ����-������� � ��������� ��. ��� ����� � ����� .htaccess ���������� ������������ ��������� ������:
RewriteEngine On RewriteBase / RewriteCond %{REQUEST_METHOD} POST RewriteCond %{REQUEST_URI} *wp-comments-post\.php* RewriteCond %{HTTP_REFERER} !.*yourdomain.com.* [OR] RewriteCond %{HTTP_USER_AGENT} ^$ RewriteRule (.*) http://www.anywhere.com/$ [R=301,L]
���, ��� �� ������:
  1. ���������� ���������� �� POST ������
  2. ��������� ���������� �� ���� ������ �� wp-comments-post.php
  3. ��������� ��������� Referrer
  4. ���������� ������ ����-���� ����� �� ��� IP �����
��������� 1: � 4 ������ ��������� yourdomain.com �� ��� ����� ��� www.
��������� 2: ���� ��������� ���� ��� ���-�� ������� �� �������� Referrel, �� ��� ������������.
���� ����� ������������ ������� �������� ���������� ����� � ������������.
��� ��� ��������� ��������:
SetEnvIfNoCase Via evil-spam-proxy spammer=yes SetEnvIfNoCase Referer evil-spam-domain.com spammer=yes SetEnvIfNoCase Referer evil-spam-keyword spammer=yes SetEnvIfNoCase Via pinappleproxy spammer=yes SetEnvIfNoCase Referer doobu.com spammer=yes SetEnvIfNoCase Referer poker spammer=yes Order allow,deny allow from all deny from env=spammer
# ���� .htaccess Tom Raftery's - ����������� � ������������� - ��� # �������������� ���������� �� ��������� ������ .htaccess �������� # http://www.tomrafteryit.net/category/htaccess/ # ��������� ���������� 4 ������� 05 Options +FollowSymlinks RewriteEngine On php_flag register_globals off # ���� ����� ����� � �������������� User-agent # "Crazy Browser 1.x.x � Mozilla/3.0 (compatible; Indy Library)", # ������� � ���� ������������ ��������� ��������� mod_rewrite. # ��������, ��� � ������ "^", ����� ������� ����� # ������������� ����� User-Agent � "Indy Library" # � "TrackBack" � ������ User-Agent. RewriteCond %{HTTP_USER_AGENT} Indy.Library [NC,OR] RewriteCond %{HTTP_USER_AGENT} TrackBack [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^Crazy Browser [NC] RewriteRule .* - [F] # ����� ����� ����� ��������� � ip 12.163.72.13 ������� � ����� ������������� ���. RewriteCond %{REMOTE_ADDR} ^12.163.72.13$ RewriteRule .* - [F,L] # ����� ������� - ������������ SetEnvIfNoCase ������ RewriteCond # - ��� ����� ����������, �������� ��� referrel. �������� ������ # ��������� �� �������� # http://blog.koehntopp.de/archives/671-Mehr-ueber-den-Trackback-Spammer.html # ����� ����� ��������� �� User-Agent Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90) # ������� � ����������� ��������� # (SetEnvIfNoCase User-Agent 9x 4.90 spammer=yes) ��� ������� # ������� ����� User-Agent, �� ����� ���������, �������� ��� # ������ - �� �������� �������� ��������� ������� �����������, # ���� � � �� ����� � ����� ����� ������������� � ����� UA. SetEnvIfNoCase X-AAAAAAAAAAAA 1 spammer=yes SetEnvIfNoCase Via pinappleproxy spammer=yes SetEnvIfNoCase Referer yelucie.com spammer=yes SetEnvIfNoCase Referer crescentarian.net spammer=yes SetEnvIfNoCase Referer andrewsaluk.com spammer=yes SetEnvIfNoCase Referer tigerspice spammer=yes SetEnvIfNoCase Referer doobu.com spammer=yes SetEnvIfNoCase Referer camfun24 spammer=yes SetEnvIfNoCase Referer latinonakedgirl spammer=yes SetEnvIfNoCase Referer ronnieazza.com spammer=yes SetEnvIfNoCase Referer highprofitclub spammer=yes SetEnvIfNoCase Referer dvdsqueeze.com spammer=yes SetEnvIfNoCase Referer sexsearchcom.com spammer=yes SetEnvIfNoCase Referer 6q.org spammer=yes SetEnvIfNoCase Referer d4f.de spammer=yes SetEnvIfNoCase Referer adultactioncam spammer=yes SetEnvIfNoCase Referer seventwentyfour.com spammer=yes SetEnvIfNoCase Referer genaholincorporated.com spammer=yes SetEnvIfNoCase Referer firsthorizonmtg.com spammer=yes SetEnvIfNoCase Referer personalsites.info spammer=yes SetEnvIfNoCase Referer bukakke-bukake-bukkake-bukkakke.com spammer=yes SetEnvIfNoCase Referer camgirlslive.com spammer=yes SetEnvIfNoCase Referer dvd-copy.com spammer=yes SetEnvIfNoCase Referer shaffelrecords.com spammer=yes SetEnvIfNoCase Referer mcr8.com spammer=yes SetEnvIfNoCase Referer dating.blogs.com spammer=yes SetEnvIfNoCase Referer online-casino-pops spammer=yes SetEnvIfNoCase Referer 8thstreetlatinas spammer=yes SetEnvIfNoCase Referer boysfirsttime.com spammer=yes SetEnvIfNoCase Referer gofordgo.com spammer=yes SetEnvIfNoCase Referer buy-hgh-human-growth-hormone.net spammer=yes deny from env=spammer deny from 66.28.54.254 deny from 12.163.72.13 deny from 71.57.133.162 deny from 84.92.124.116 deny from 196.7.0.160 deny from 210.43.0.225 deny from 219.93.174.107 deny from 205.134.241.50 <Files trackback> <limit POST> SetEnvIf User-Agent "Mozilla" trackers SetEnvIf User-Agent "Opera" trackers SetEnvIf User-Agent ^$ trackers Order Allow,Deny Allow from all Deny from env=trackers </limit> </Files>
]]>
������������� <![CDATA[������ mod_rewrite. ����� 3]]> /?p=78 2007-01-09T08:52:52Z 2007-01-09T08:52:52Z ������ Apache � ���� ���������� ������ �� ������������� � �������� "������ ����������" URL � "��������� ������". ��������� ���������� � ������������ ��� �������, �������������� ����� ������� ����������.
������ ������ ����� ���� � ������������� ����������, � ������ ���������� ����������� ������ ".txt" ������ � ������������ ��������� �������� ��� ����.
�����������, ��� � ��� ���� ����������� ������� �� ������� �����-�� �������. ������� ���������� � ��������� ������� ����� ������:
http://www.yoursite.com/cgi-bin/shop.cgi?product1
http://www.yoursite.com/cgi-bin/shop.cgi?product2
http://www.yoursite.com/cgi-bin/shop.cgi?product3
��� ������ ������������ ��� ������ �� ����������� ������� �����.
� ������ ��������, ��� �� ������ �������� ���� ��� ���������� � ��������� �������. ��� ��� ��������� ��������� ������������ � �� ��� ���������� ���������, �������� � ����������� URL, � ������� ���������� ������ "?".
����� ������������ � ���������� ��� ���������� �������� URL ����:
http://www.yoursite.com/cgi-bin/shop.cgi/product1
� ������ ������ ������ "?" ���������� �� "/".
��� ����� ��������������� URL � ����� ������ ���������� ����� ����� ���:
http://www.yoursite.com/shop/product1
��� ����������, shop ������ ���-�� �������� �����������, ���������� ������ product1, product2 � �.�.
���� ������������, �� �������� ����������� ������� � ���������� ���������� �� ����� ������, �� ��� ������ ������ ����� ������������������ � ������: shop.cgi?product1.
����� �������� ������ ������� ����� ������������ mod_rewrite, ��������� ��������� ����������� � ����� .htaccess:
RewriteEngine on Options +FollowSymlinks RewriteBase / RewriteRule ^(.*)shop/(.*)$ $1cgi-bin/shop.cgi?$2
���������� $1$2 ���������� ��� ���������� "backreferences". ��� ������� � ���������� ��������. ���������� URL ����������� �� �����. ���, ��� ��������� ����� shop, ���� ��� ��� ��������� ����� shop/ ������������ � �������� � ���� ���� ����������: $1$2.
�� ����� �������, ���� ������� ������������ "�������" ����:
RewriteRule ^.htaccess*$ - [F]
������ �� ��� �� �������� �������� ���������� URL �������, � ������ ����, ��� ���� URL ������ �������������� ���������� �� ������.
��� ����� ������ ����:
RewriteRule ^(.*)shop/(.*)$ $1cgi-bin/shop.cgi?$2
����������� ����� ���������:
RewriteRule �������URL ����������������URL
��� ������, ��� ��������� ��������� �������������� "����������" URL ������.
� ���������� � ������� � ���� .htaccess, ����� ��� �������� ��� ������ �� �����, ������� ����� ������ cgi-bin/shop.cgi?product, �� ������ ����: shop/product
������, ����� ��������� ������ �������� � ��������� ��������, �� �������������� ���� ��� ������ ������� �������.
����� ������� �� ������ ���������� ����� ������������ ���� � ����, ������� ����������� ���������, ��� ���� �������� ������ � ������� �������������� ���������� ��������� ��������. �������� �������� �� ��� URL ������� �� ������ �����. �������� �� �����, ��� ����� ��� � ������������ ��� �������� ��������� - ��� (���������������� ���). �� �� ���� �� ��������� � ������ ������.
� ����� ������ ������� �� �������, ��� �������������� ������� .txt ������ � �������� ���������.
������ ������� ����������, ���������� � Apache ������������� ���-����� � ����� �������. ��� �������� ��, ��� ��� �� ����� ���������� ���� � ������������ ���������� � ����-��������.
������, ������������ �������� � ����� robots.txt, ��������������� ����� ������ �� ���� ���� ������, ����� ����� ������ ���������� � ��������� �����������, ��� ������ ����� �� IP ������. ��� ����, ����� ����������� ���, � .htaccess ������ ���� ��������� ������:
RewriteEngine on Options +FollowSymlinks RewriteBase / RewriteRule ^robots.txt$ /text.cgi?%{REQUEST_URI}
������ ��� ������� ����� robots.txt ��� RewriteRule ������������ ���������� (������) � ��������������� ������� ������� text.cgi. ����� ����, ���������� ���������� �������, ������� ����� ���������� � ������������ � ������ �������. REQUEST_URI ���������� ��� �������������� �����. � ������ ������� ��� � robots.txt. ������ ������� ���������� robots.txt � �������� ��� web-�������� ��� ������ ���������� �������. ����� �������, �� ����� ������� ���� ����������� � ����� ���� ���-�����.
� ���� �����, ������ ����� ������������ ���������� ��������� $ENV {'HTTP_USER_AGENT'} � �.�. ��� ��������� ��������� ���� ��������� ����������. ��� �������� ����� ��� �������� cgi, ����������� ���� (������ ���� � ����� http://fantomaster.com):
#!/usr/bin/perl # If required, adjust line above to point to Perl 5. ################################# # (c) Copyright 2000 by fantomaster.com # # All rights reserved. # ################################# $stats_dir = "stats"; $log_file = "stats.log"; $remote_host = "$ENV{'REMOTE_HOST'}"; $remote_addr = "$ENV{'REMOTE_ADDR'}"; $user_agent = "$ENV{'HTTP_USER_AGENT'}"; $referer = "$ENV{'HTTP_REFERER'}"; $document_name = "$ENV{'QUERY_STRING'}"; open (FILE, "robots.txt"); @TEXT = ; close (FILE); &get_date; &log_hits ("$date $remote_host $remote_addr $user_agent $referer $document_name"); print "Content-type: text/plain "; print @TEXT; exit; sub get_date { ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(); $mon++; $sec = sprintf ("%02d", $sec); $min = sprintf ("%02d", $min); $hour = sprintf ("%02d", $hour); $mday = sprintf ("%02d", $mday); $mon = sprintf ("%02d", $mon); $year = scalar localtime; $year =~ s/.*?(d{4})/$1/; $date="$year-$mon-$mday, $hour:$min:$sec"; } sub log_hits { open (HITS, ">>$stats_dir/$log_file"); print HITS @_; close (HITS); }
��������� ���� � ������ ���������� � �������� ��� � DocumentRoot ���������� ������� � ���������� ����� ������� � ����� (chmod) 755. �����, �������� ������� stats. ����� ��������� �������� � ���, ��� ���������� ������ �� ������ �������� �� ����� ������������.
���� ��������� ������ ������� �� ��������� ��������� cgi-�������� � ������� ���������� (DocumentRoot), �� ���������� ��������� �������:
RewriteRule ^robots.txt$ /cgi-bin/text.cgi?%{REQUEST_URI}
�������� ��������, ��� � ���� ������, ����� ���������� �������� ���� � ���� �������!
�������, ��� ������� �������, ������ � ���������� ����� ���� ����������:
RewriteCond %{REMOTE_ADDR} ^212.37.64 RewriteRule ^.*$ - [F]
���� �� ����� � ���������� ��������� "^212.37.64" ������ "^212.37.64." (� ������ � �����), �� ���� �� ��� ��� �� ����� ������, � ����� �� ��������� �� �� ����� IP ������?
���������� ��������� ^212.37.64 ������������� � ��������� � ��������� �������:
212.37.64
212.37.640
212.37.641
212.37.64a
212.37.64abc
212.37.64.12
212.37.642.12
�������������, ��������� ����� "4" ����� �������������� ����� ���������� �������. ������, ������������ ��������� IP �������� ����� 255.255.255.255 � ������� �������������, ��� �������� 212.37.642.12 � ������������ (������������) IP. ������������ ���������� IP � ��������������� ������ � 212.37.64.12!
�����: Denveroid
��������: SiteMaker.Ru
]]>
������������� <![CDATA[������ mod_rewrite. ����� 2]]> /?p=77 2007-01-09T08:50:34Z 2007-01-09T08:50:34Z ������ Apache � ������� ����� �� ������������� � �������� ������ mod_rewrite. � �������, ������� ��� ����������, �� ������������ �����������, ������� � ���������� ������ �������� ���������: "���� ���-�� �������� �������� ������ � ����� .htaccess, �������� ������, ����������, ��� ������ � ����� ��������".
��� "�������" ���������, �� ���� ������ ������� ��������� ��������� �� ������. �������, ��� mod_rewrite �������� �������, ������� ������������� "���������� �� �������� �������� ������������� ��������� ������������� URL-��".
�� ����� ������������ "�������" ��� ������ ��������� "������� �������". "�������" ����� ��������� ������ � ��� ������, ���� ����� ��� ����� �������� ��� �������.
���������: ������� ������ �������������� �������!
������� ��� ���� ������ (������ � ����� .htaccess):
RewriteEngine on Options +FollowSymlinks RewriteBase / RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon RewriteRule ^.*$ - [F]
���������� ������ ���� ������� ���� �������� ��������� � ������ ����� ����������. �� ������� - ��������� "������ ����������", �� ���� ������ ������.
��������� ��� ������ ��������� ������ ���������� ������ ��� ������� ��������� "EmailSiphon" (������� ����� ��� ����-������). ������ ����� �������� ��������� �������� ������� � ��������� ��� �������.
������:
RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon
������� �� ���� ������:
��������� (��������): RewriteCond
����������� ������: %{HTTP_USER_AGENT}
������� �������: ^EmailSiphon
����������� ������ � ���������� �������, ������� ����� ���� �������� � ����� �����: "% {���_����������}".
������� ������� � ���������� ���������. ��� ����� ������� ��������� ���� ����� ����������� ���������� ��������� ��� �����.

���������� ���������

���������� ��������� � ��� ��������, ����������� ������ ������ ��� ������ � ����������� ����� ������, ��������������� ����� ������� � �������� ������. ����� ����, �������������� ������� �� ������ � ������ ����������� ��������� �������� ��������� ������ � ���� ������� �����, ���������� ������ � ������ �� �������, ��������� ������ �� ������� � �.�. ������ ������� �� ��������, �� ������� �������� ��� ���������, �������� ������ ������� ������ � ������ ������, ��������������� ������� (�������), ���������� � ���������� ���������� ���������.
���������� ��������� ������� ����������, ����������� ����� ���������������� �� ������ ���������.
��������, ���������� ���������:
s/abc/xyz/g
������� ������ "abc", �� ������ "xyz" �� ���� ������.
��� ������� ����� �������� ������ ��������� � ���������� ���������:
. (�����) - ����� (����� ������)
| - ����������� (�� ���� /abc|def/)
* - ������������� (��������� ����� �����)
^ $ - ����� ������
s - �������� (string1 �������� �� string2)
g - ����������� (������ �� ����� ������)
���������� ��������� �������������� � ������� ���� ��������� � ������ "�������" ��������. ��� �� �������� ��������� ������, � ������������ ������� ����������, �������� ������� ���������������� ���� Perl ��� PHP, � ����� ���������� ����������� (Emacs).
���� �������� � ����� ���������� ��������� � ������ mod_rewrite, �� ��� ������������ � ���������� RewriteRuleRewriteCond.
"^" ���������� ������ ������. �� ����� �������, ��� UserAgent ������ ���������� �� ������ "EmailSiphon" � �� � ���� ������� ("NewEmailSiphon", ��������, �� ������� ��).
��, ��������� ������ ���������� ��������� �� �������� ������ "$" (����� ����� ������), UserAgent ��� �� ����, ��������, "EmailSiphon2".
��������� ������ ������ �������:
RewriteRule ^.*$ - [F]
����������, ��� ������ ����� ������, ����� ����� �������� ������.
���������� ��������� "^.*$" ��������: "������ �� ���� ������ ��������".
����� "." � ���������� ��������� � ���� ������ (�������������� ����), ���������� ����� ��������� ������.
"*" �������� ��, ��� ������ ����� ����������� �������������� ���������� ���. � ���� ������, ���������� �� ����� ������������ �����, ����� ������ ������.
"EmailSiphon", �������, �� ������������ �������� �������. ������ ��������� ���� ����� ��������� - "ExtractorPro". �������� �� ����� ��������� ������ � ����� ������. � ����� ������ ��� ���������� ��� ���� �������.
������ ���� .htaccess ����� ��������� ���:
RewriteEngine on Options +FollowSymlinks RewriteBase / RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR] RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro RewriteRule ^.*$ - [F]
������ �������� [OR] (� ������ ������ RewriteCond) ���������� "������". ���������� ��� ��������� �����:
NC � �� ��������� ������� ����.
OR � �������� "��� ��������� �������".
������ NC ��������� ������������ ������� ���� � ������� �������. ��������:
RewriteCond %{HTTP_USER_AGENT} ^emailsiphon [NC]
��� ������ ����������, ��� � "emailsiphon""EmailSiphon" ����� �������� ��� ���������� ���������.
�� ������ ������������ ����� ��������� �������, �������� �� ��������.
RewriteCond % {HTTP_USER_AGENT} ^EmailSiphon [NC, OR] RewriteCond % {HTTP_USER_AGENT} ^ExtractorPro
��� ������� ����������� �� ����� �������. ����� �������, �� ������ ����������� 10, 100, 1000 ��� ����� ��������� �������� ���������. ����������� ���� 1000 ������� � ������ ������ �������� ������� � ������������ ����� .htaccess.
� �������������� ������� ������������ ���������� ���������� HTTP_USER_AGENT. ���������� ����� ������ ����������:
REMOTE_HOST REMOTE_ADDR
��������, ���� �� ������ ������������� ����� ���������� � www.site.ru, �� ������ ������������ ���������� ���������� REMOTE_HOST ����� �������:
RewriteCond % {REMOTE_HOST} ^www.site.ru$ RewriteRule ^.*$ - [F]
���� �� ������ ������������� ������������ IP �����, ������� ����� ��������� ���:
RewriteCond % {REMOTE_ADDR} ^212.37.64.10$ RewriteRule ^.*$ - [F]
� ���������� ��������� �� �������� ������� � ������� IP ������ ����� ������������ ��������� � �������� �����.
����� ����� ��������� ����� ��������:
RewriteCond %{REMOTE_ADDR} ^212.37.64. RewriteRule ^.*$ - [F]
���� ������ ����������, ��� ����� ������������� �������� IP ������� � 212.37.64.0 �� 212.37.64.255.
� ��� ��������� ������� ��� �������� ������������� ������ (������� ����� ���� � ��������� �����):
RewriteCond %{REMOTE_ADDR} ^212.37.64 RewriteRule ^.*$ - [F]
��������, ������!
���� �� ����� � ���������� ��������� "^212.37.64" ������ "^212.37.64." (� ������ � �����), �� ���� �� ��� ��� �� ����� ������, � ����� �� ��������� �� �� ����� IP ������?
�� ��� ��� �� ������������ ������� RewriteRule, ������� ���������� ��������� �� �������. � ������� ����� ���������� �� ��������������, ��� ����� ������������ RewriteRule ��� ������������� ����������� � ������������ ������.
�����: Denveroid
��������: SiteMaker.Ru
]]>