The last token ( %otherquot) means that “Oh, that string here does not mean anything.”. We teach awstats the meaning of each field when parsing the log. It’s used to set the settings shared by all your awstats config. In /etc/awstats/, add : LogFormat = " %host - %host_r %time1 %methodurl %code %bytesd %refererquot %uaquot %otherquot" log main Īs this last field is not used by awstats, we should tell it to ignore it. To use this format, add main at the end of your error_log directive. It’s the same as the combined format, plus the $http_x_forwarded_for bit at the end. In the server scope, add : log_format main '$remote_addr - $remote_user "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"' ). It’s used to capture the client IP address when he is connecting through a proxy of load balancer.įor that, we define another log format, named main in /etc/nginx/nf. Using the default format is fine, but you can log one more field, that could be pertinent : the http_x_forwarded_for. It’s equivalent to error_log / path / to / log. If you set your errors log like this : error_log / path / to / log. Nginx by default output logs that already can be read by awstats, as long as you use the Combined format. /usr/share/doc/awstats : docs, tools for building the static html pages, icons and other static files used by html./usr/share/awstats : contains all tools and libraries used by awstats./etc/awstats : contains all the conf files for each of your awstats installation.On debian squeeze, awstats install things in 3 places : Install Awstats apt - get install awstats
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |