Tag: apache
-
Check httpd.conf syntax in Apache Severs
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. # /usr/sbin/httpd -t
-
Simple way to get stats from Apache
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. #!/bin/sh echo ‘Number of unique visitors’ cat /var/log/apache/www.yoursite.com-access.log |awk ‘{print $1}’ | sort | uniq | wc…
-
Bash: Find all .hidden files but ignore .htaccess file
A bash command to search for all hidden files recursively in the current directory but ignore apache .htaccess files. find . -type f \( -iname “.*” ! -iname “.htaccess” \)
-
Analyse Access Log with awk for most common ip addresses
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 /path/to/log | awk ‘{print $3}’ | sort | uniq -c | sort -rn | head -20
-
What version of Apache are we running?
httpd -V