Some times its hard to make changes to productions servers configuration. In apache you can check http.conf syntax before you restart or reload the service.
bash |copy code |?
1 # /usr/sbin/httpd -t
Some times its hard to make changes to productions servers configuration. In apache you can check http.conf syntax before you restart or reload the service.
bash |copy code |?
1 # /usr/sbin/httpd -t
This way you can get stats from your logs but this method is a little bit rudimentary as you are going to get visits from crawlers, bots,… that are not real visits. Parse your logs directly with awk.
bash |copy code |?
1 #!/bin/sh2 3 4 echo 'Number of unique visitors'5 6 cat /var/log/apache/www.yoursite.com-access.log |awk '{print $1}' | sort | uniq | wc -l7
A bash command to search for all hidden files recursively in the current directory but ignore apache .htaccess files.
echo 'Ip of unique visitors'
Some cat with awk and then sort to find out what ips are most common in your apache access.log file. Remember that all ips are include here. Bots, crawlers, clients…
cat cat /var/log/apache/www.yoursite.com-access.log |awk '{print $1}' | sort | uniq | wc -l |awk '{print $1}' | sort | uniq
bash |copy code |?
1 find . -type f \( -iname ".*" ! -iname ".htaccess" \)