/wwwroot/cgi-bin[Root @ athena cgi-bin] #./awstats. pl-update-config = broncho.cn
Found:
Create/Update database for config "/etc/awstats/awstats.broncho.cn. conf" by AWStats version 6.8 (build 1.910)From data in log file "/var/log/httpd/broncho.cn _ access_log.20100927 ″...Phase 1: First bypass old records, searching new record...Searching new records from beginning of log file...AWStats did not find any valid log lines that match your LogFormat param
, stop the site, delete site logs, and restart the site. 2 ,. conf File Settings name example: AWStats. youlu3.conf AWStats configuration file (AWStats. # ------------------------------------------------------------------ # The following describes the common basic settings, other settings use the default settings on it # ------------------------------------------------ logfile: Location of the log file (ex % YY-24 % MM-24 % DD-24 is in the last 24 hours format) logfile = "C:/Windows/syst
to the client without reading the file1 484 errorlog Logs/error_logWhere error logs are stored491 LogLevel warnLevel of Apache logs497 Logformat "%h%l%u%t \"%r\ "%>s%b \"%{referer}i\ "\"%{user-agent}i\ "" combined498 Logformat "%h%l%u%t \"%r\ "%>s%b" common499 Logformat "%{referer}i,%u" RefererLogformat "%{user-agent}i" AgentThe format of the log is defined and
errorlog Logs/error_logWhere error logs are stored491 LogLevel warnLevel of Apache logs497 Logformat "%h%l%u%t \"%r\ "%>s%b \"%{referer}i\ "\"%{user-agent}i\ "" combined498 Logformat "%h%l%u%t \"%r\ "%>s%b" common499 Logformat "%{referer}i,%u" RefererLogformat "%{user-agent}i" AgentThe format of the log is defined and represented by a different code name513 #Cus
Apache Access LogView the virtual machine log file directory through the virtual host configuration Vhost fileAccess logging for each user's request, in the HTTPD profile definition log format, is a virtual host profile that uses the format name to define the log formatvim/usr/local/apache2.4/conf/httpd.conf//Search Logformat Logformat "%h%l%u%t \"%r\ "%>s%b \"%{referer}i\ "\"%{User- Agent}i\ "" Combined
conf/extra/httpd-remoteip.conf
Vi/usr/local/apache/conf/extra/httpd-remoteip.conf
LoadModule Remoteip_module modules/mod_remoteip.so
Remoteipheader x-forwarded-for
Remoteipinternalproxy 127.0.0.1
3), test:
Copy Code code as follows:
#/usr/local/apache/bin/apachectl-t
#/usr/local/apache/bin/apachectl Restart
# Look at the log
2, Apache-2.4 configuration Mod_remoteipSelf-MOD_REMOTEIP module does not need to be installed, only need to modify log format
Cop
LogLevel warnError log Error_log level is a warning, this level is the default
Logformat "%h%l%u%t \%r\"%>s%b \ "%{referer}i\" \ "%{user-agent}i\" "combined
Combined log format (Combined log)
%H host name,%l remote registration name%u remote user%t time (in English format)
Represented in the shell as:
[root@test230 logs]# date + "%d/%b/%y:%t%z"
[root@test230 logs]# 16/may/2012:15:16:49 +0800
/"%r/" requests the first line of%>s state,%b bytes s
11.18 Apache user authenticationUser authentication for HTTPDvim /usr/local/apache2.4/conf/extra/httpd-vhosts.conf //把111.com那个虚拟主机编辑成如下内容/usr/local/apache2.4/bin/htpasswd-c-m/data/.htpasswd amingReload Configuration/usr/local/apache2.4/bin/apachectl-t/usr/local/apache2.4/bin/apachectl Graceful绑定hosts,浏览器测试curl -x127.0.0.1:80 111.com -I //状态码为401curl -x127.0.0.1:80 -uaming:passwd 111.com -I //状态码为200User authentication for HTTPDYou can also authenticate against a single fileDocumentRoot "/da
/error_log" file under the ServerRoot directory.²errorlogformat directive: Set the format of the error log, Apache HTTP server predefined many format strings can be directly referenced.²customlog directive: This instruction sets the client access log file and the log format, in the format "Logs/access_log", the syntax format is customlog file name format²LOGFORMAT directive: This instruction describes the user log file format, you can directly use the
about the error situation, as well as different large events in the server lifecycle.
Create log format LogFormat "%h %l %u %t "%r" %>s %b" commonLogFormat "%h %l %u %t "%r" %>s %b" "%{Referer}i" "%{User-agent}i"" combined Logformat instructions allow you to tell Apache which aspects of the request you want to record. And you still need additional instructions to tell Apache where to record that informati
three main configuration files, located in the/usr/local/apache/conf directory. These three documents are:
Httpd.con-----> main configuration filessrm.conf------> Fill in the Resource fileaccess.conf---> Set access rights for files
Note: Specific configuration can refer to: http://httpd.apache.org/docs/mod/core.html
(2) log file for Apache server
We can use log format instructions to control the log file information. The IP address and hostname of the HTTP request browser can be logged to the l
/xferlog.legacy #数据传输记录
Logformat Auth "%v%P%h%t"%r/"%s"
Logformat Write "%h%l%u%t"%r/"%s%b"
# defines several log formats that can be tailored to suit your needs:
#%a: Client IP
#%A: Anonymous user name (password for anonymous users)
#%b: Number of bytes to send request
#%d: directory name (relative path)
#%d: directory name (absolute path)
#%f: Uploaded or downloaded file name (absolute path)
#%F: Upl
Install Squid
Yum install squid-y
#-y represents automatic selection y, automatic installation
After installation, you can customize the HTTP proxy port, set the source IP white list, etc.
vi/etc/squid/squid.conf
#------Custom HTTP port:
# Squid normally listens to port 3128
http_port 8088
#----- -Set source IP Whitelist, add these two lines to the http_access deny all front
ACL client src 122.55.87.125
http_access allow client # and
final Ly deny all other access to this proxy
http_access
/yfYesbash scriptsWrite Dynamicsweb-cgiProgram, the user submits information each time, this program will execute some server-side query operations, and then return the data processing to the client.
To prevent unauthorized users from accessing this program frequently and affect the access of other normal users, some protection measures are required.
Final effect:
Blocked Information Page
In the/shell/yf domain, hold down F5 and refresh all the time. A few seconds later, the unblocking informat
Apache module mod_log_configAvailable ages: en | ja | Ko // now Chinese
Description: logging of the requests made to the serverStatus: BaseModule identifier: log_config_moduleSource File: mod_log_config.c
SummaryThis module provides for flexible logging of client requests. logs are written in a customizable format, and may be writtenDirectly to a file, or to an external program. Conditional logging is provided so that individual requests may be encoded orExcluded from the logs based on character
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.