12/29/2023 0 Comments Turn on awstats cpanel![]() Since we’re running nginx in front of Apache this means, it’s only the time spend in the proxy itself, so all dynamic processing will still be handled by apache. ![]() The request time itself, is the time it takes nginx to process the request. ![]() The log_format above is matching the normal apache logformat, except the very last parameter, which is the request time. The hook itself is a small python script, which hooks into ‘Whostmgr::Accounts::Create’, reads the data from stdin to get information from the accounts getting created in cpanel, it generates a awstats config file in the users home directory, which will get loaded for that specific user.īy default cpanel doesn’t allow custom configuration for awstats, which means you need to log into WHM, go to ‘Statistics Software Configuration’ and enable ‘Awstats include file’.Īlso you’ll need to change the log_format in the nginx config to the following: log_format timed_combined '$remote_addr - $remote_user "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" $request_time' So I made a small cpanel hook, that is using their hook system. Which results in, that it’s not possible to add your own log format in the main config, so it will work for all your domains. Why do I say ‘cpanel awstats’? The reason is that the normal awstats works perfectly, but because the stats for the domains is depending on how awstats and cpanel work together, cpanel have come up with a pretty bad way to handle the main configuration file for awstats. So I’ll show you how to make nginx support for cpanel awstats. The problem that happens when using one of the above, is often the logformat will change a little, which will break awstats. It could be nginxcp, cPnginx, ApacheBooster etc. The reason behind this is that it’s the most common webserver, but Apache is often using a lot of memory when you could lower this. When using cpanel as a control panel for shared hosting, you’re by default forced to use Apache.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |