![]() ![]() If you haven’t already done so, you need to enable a mod in Apache called cgi. Phase 2 : Now process new records (Flush history on disk after 20000 hosts). Searching new records from beginning of log file. Phase 1 : First bypass old records, searching new record. For example, if you have thousands of entries, it may take a while.Īfter it is done, if it is successful, with no errors, you should get some output like: Create/Update database for config "/etc/awstats/" by AWStats version 7.2 (build 1.992)įrom data in log file "/var/log/apache2/". Type the following command (remember to substitute in your actual domain name): sudo /usr/lib/cgi-bin/ -config= -updateĪfter you enter in that command, it may take several seconds, or even several minutes, depending on how many entries you have in your Apache log files. LogFile="/var/log/apache2/" Step 6: Generate The Initial Stats For awstats For Your Site The following is what would look like if my log files were located at /var/log/apache2/.Īdd the following line to the file You will be adding the exact location of your log file location. Now add a line called LogFile to that file. Next, once you know where the log files are stored, you are going to have to edit the awstats config file. So, from the above CustomLog line, I learn that my computer stores my domain’s Apache log files at It may be different for you, the key is just to find out where your files are logged. For example, in my file, it looks like CustomLog $/ combined I am using vim, but you can use whichever text editor you like. Next, find your domain’s apache config file and open it with a text editor. In order to have awstats work properly, it has to know exactly what your Apache log files for your domain are called, and exactly where they are located. Step 5: Find Out Where Your Apache Logs Are Stored. Now add the following line to the file SiteDomain=""Īnd now save and exit the file. If one exists, you can either remove the comment, or just add a whole new line with SiteDomain="" There might already be a line in the file, like SiteDomain=”” commented out with #. You are going to add the following line SiteDomain="". Next, you need to edit the file to add an important line for awstats to know which domain you are getting data from. Substitute with whatever your domain is called. You need to copy the awstats file for your domain. Once you are in the awstats directory, you should be able to see,Īfter doing an ls command that you have a file called:Īnf is the file you will need to copy for your domain, so that you can have a domain-specific config file. Step 3: Change Into The awstats Directory And Copy The Default Config FileĪfter awstats is installed type: cd /etc/awstats Simply type: sudo apt-get install awstats sudo apt-get update & sudo apt-get upgrade -y Step 2: Install awstats In to make sure you are using the most up-to-date software, you need to first do the following. This article will mainly just write awstats. It is important when dealing with the software, to only use awstats because case matters. When talking about the program, it is spelled AWStats, but the software we are going to install and configure is spelled awstats. In addition, it assumes that you are connecting to VPS or on your own computer, that you have already setup DNS and Apache for your domain, and that your domain name is (substitute for whatever your domain name is).Ī quick note to avoid confusion: In this article I refer both to AWStats and awstats. This article assumes that awstats is not already installed on yours system. ![]()
0 Comments
Leave a Reply. |