1, set the environment variable
In apache, you can use regular to judge a lot of variables, and then set another variable for later configuration use
For example, you have to determine whether the user is Access a folder and set a variable to record it:
SetEnvIfNoCase Request_URI "^\\/aslibra" ISSTART=1
SetEnvIfNoCase means case insensitive
Request_URI matches "^\\/aslibra"
If yes, ISSTART=1, otherwise it is not 1
In addition, no record The log of the image can be to find the file path, and then set the variable for later use:
SetEnv NOFILES 1
CustomLog logs/access_log combined Env=!NOFILES
2. Handling stolen chains
Handling stolen chains is generally done on the referrer, see the following example: Br>
SetEnvIfNoCase Referer "^http://www\\.aslibra\\.com/" local_ref=1
Order Allow, Deny
Allow from env=local_ref
Allow from 127.0.0.1
The above is the judgment The source is the above domain name, and then set to allow access
SetEnvIfNoCase Referer "^http://notpermit\\.aslibra\\.com/" aaa
Order Allow, Deny
Allow from all
Deny from env=aaa
The above is the source of the judgment, and then the domain name is not allowed< Br>
3, log splitting
Log splitting can be handled using cronolog
It is easier to install, just like normal software Installation
Definition format:
LogFormat "%h %l %u %t \\"%r\\" %>s %b \\"%{Referer}i\\" \\"%{User-Agent}i\\"" combined
LogFormat "%h %l %u %t \\"%r\\" %>s %b " common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
LogFormat "%h %{%T}t \\"%r\\" %{cookiename}C" record
The above is the definition of the log format, you can define a lot of log formats so that The following log is used
, for example, the common is combined, there is generally collected content, if you want to collect cookies (% {cookiename} C) and custom Inter-format (%{%T}t), you can use the above similar record method
CustomLog "
In the LAN working environment, the network administrator often manages the serve
What does raid mean? Raid is the abbreviation of English Redundant Array of Independent Disks. In Ch
code online, we provide it directly to everyone, do not need to find it, the code is as follows: reg
which is again a problem with the client Exchange server. Exchange 2003 and DC are the same server.
Modify CGI script timeout defaults from IIS
How to install syslog server on Linux system
The most complete in history! Proxy server settings method highlights
Three Ways of Dialysis Server Testing
Five server-based issues that must be understood
Modify remote server login password
CentOS uninstall Apache method detailed
Visit website 403 error Forbidden solution
Tips: Several tips for protecting web servers
IIS 6 Frequently Asked Questions
Calculate the number of WWW online users
Windows 2003 build Apache PHP MySQL environment experience sharing
How to block win7/8 win10 official version of the installation package prompt?
Compressed Vista system folder caused the collapse of the solution
Foobar2000 can't play AAC format music. How to do
MySQL installation on Windows details
Remove Windows 7 hidden stubborn folders
Win8.1 system drawing tools feature a large inventory