![]() #> None # Because Nginx is used here, write none and skip. confĬonfig file path (\ 'None \ 'to skip web server SetUp ): confĮxample: c: Program filesapache groupapacheconfhttpd. Then execute too LsThe awstats_ Configuration Wizard in the directory to create a new statistics.Įnter full config FilePath of your Web server.Įxample:/usr/local/apache2/conf/httpd. Run the downloaded tar package ExtractTo any directory, for example,/usr/local/awstats. log new_log # log generation pathĭownload the latest awstats package. \ '$ Http_user_agent $ http_x_forward Ed_ \' Īccess_log logs/access. \ '$ Status $ body_bytes_sent $ http_referer \' \ '$ Remote_a DdR-$ remote_user $ request \' Log_fo RmAt new_log # format alias (Note: if there are multiple virtual hosts, the alias cannot be the same) We also need to make a small modification to the Nginx log format, otherwise awstats will not be able to make statistics. Use Crontab to automatically execute the script, and create logs by day.īefore installation, make sure that the Perl environment on your server is ready. ![]() ![]() sh to the custom directory, such as/opt/nginx/sbin/logcron. KillAll-s USR1 nginx # Use the USR1 parameter to notify the Nginx process to switch the log file to save the above script content as the file name is logcron. log/opt/nginx/logs/access _' Date+ % Y % m % D'. We can regularly execute a Shell script to switch logs, rename or transfer logs. In today's version, Nginx has not been able to create logs in batches by date using parameters such as % YY, but by sending a specific signal to the nginx process, nginx can be used to generate a log file again. Configure Nginx to automatically cut logsĭifferent from Apache HTTP Server (Apache), Apache can redirect log output through pipelines to perform Automatic Log cutting. Nginx in the current version has not been the same as Apache, using parameters such as % YY to create logs in batches by date, butġ. Apache can redirect the log output through pipelines to enable automatic log cutting. configuring Nginx Automatic Log cutting is different from ApacheHTTPServer (Apache).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |