posted this in bash, Linux, Redhat Centos, Scripts, Ubuntu on March 7th, 2012 This script will allow you to see the top user agents, urls, IPs for your log files:
Script name: ls-httpd
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
#!/bin/bash # Usage # ls-httpd type count # Eg: # ls-httpd url 1000 # will find top URLs in the last 1000 access log entries # ls-httpd ip 1000 # will find top IPs in the last 1000 access log entries # ls-httpd agent 1000 # will find top user agents in the last 1000 access log entries type=$1 length=$2 if [ "$3" == "" ]; then log_file="/var/log/httpd/some-access_log" else log_file="$3" fi if [ "$type" = "ip" ]; then tail -n $length $log_file | grep -o "[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}" | sort -n | uniq -c | sort -n elif [ "$type" = "agent" ]; then tail -n $length $log_file | awk -F\" '{print $6}'| sort -n | uniq -c | sort -n elif [ "$type" = "url" ]; then tail -n $length $log_file | awk -F\" '{print $2}'| sort -n | uniq -c | sort -n fi |
posted this in Linux, Redhat Centos on September 18th, 2011 if you already have apache installed on redhat linux
|
|
# chkconfig httpd on # /etc/init.d/httpd start |
posted this in FreeBSD, O/S on October 30th, 2010 I was having an issue getting subversion 1.4.6 + apache installed on a freebsd 8.1 system without running in to errors. These instructions should work on any version of freebsd (post 6.01).
Eventually i copied the proper port versions over from a different system and got it all working! Avoid rebuilding subversion from source on . . . → Read More: How to Install Subversion 1.4.6 with Apache 2.2.17_1 on FreeBSD
posted this in FreeBSD on October 21st, 2010 How to fix these three errors:
|
|
Cannot load /usr/local/libexec/apache22/mod_dav_svn.so into server: Shared object "libaprutil-0.so.9" not found, required by "libsvn_repos-1.so.0" Cannot load /usr/local/libexec/apache22/mod_dav_svn.so into server: Shared object "libexpat.so.1" not found, required by "libsvn_repos-1. " Cannot load /usr/local/libexec/apache22/mod_dav_svn.so into server: Shared object "libapr-0.so.9" not found, required by "libsvn_repos-1. |
You’ll need to use the locate command to see if you can find another copy of those files on your disk then link them to /usr/local/lib/ .
If you cannot locate a copy of them you can install subversion 1.4.6 in a chroot jail or on another freebsd . . . → Read More: Howto Fix libaprutil-0.so.9 not found
posted this in FreeBSD on October 21st, 2010 Here’s some info on the system:
|
|
# svn --version /libexec/ld-elf.so.1: Shared object "libaprutil-1.so.2" not found, required by "svn" # pkg_info | grep -i apache apache-2.2.15_9 Version 2.2.x of Apache web server with prefork MPM. apr-devrandom-gdbm-db42-ldap23-mysql50-1.4.2.1.3.9_1 Apache Portability Library # pkg_info subversion-1.4.0_1 Information for subversion-1.4.0_1: |
i completely removed apache:
pkg_delete -f apache-2.\*
Then removed these subversion related files:
515 2010-07-10 18:47:59 rm -f /usr/local/lib/libexpat* 516 2010-07-10 18:48:09 rm -f /usr/local/lib/libapr* 517 2010-07-10 18:48:14 rm -f /usr/local/lib/libneon* 518 2010-07-10 18:48:27 rm -f /usr/local/lib/libsvn*
Rebuilt subversion from source, then installed apache from portmaster www/apache22 and . . . → Read More: Proper way to Rebuild Subversion 1.4.0_1 on FreeBSD 6.1
posted this in Linux on September 21st, 2010 /etc/rc.d/init.d/httpd restart
posted this in Windows on July 7th, 2010 Receiving an error like this?
|
|
WP Super Cache Manager Error: Your cache directory (C:\Program Files\BitNami WAMPStack\apps\wordpress\htdocs/wp-content/cache/) or C:\Program Files\BitNami WAMPStack\apps\wordpress\htdocs/wp-content need to be writable for this plugin to work. Double-check it. Cannot continue... fix previous problems |
To Fix:
|
|
1. Click Start -> Run 2. Type services.msc & hit enter 3. Find the service running apache (ex: wampsstackAPache) 4. See what username it is running on 5. Change permissions on C:\Program Files\BitNami WAMPStack\apps\wordpress\htdocs/wp-content/cache/ and give the username found in step for read write permissions to that directory |
posted this in FreeBSD, Security on July 6th, 2010 Add the following lines to your httpd.conf:
|
|
SSLProtocol ALL -SSLv2 SSLCipherSuite HIGH:!SSLv2:!ADH:!aNULL:!eNULL:!NULL |
To Test the Fix (replace 127.0.0.1 with whatever ip you need to test on):
|
|
openssl s_client -port 443 -host "127.0.0.1" -ssl2 |
posted this in Windows on June 29th, 2010 I totally busted my permalinks… but just fixed it..so I thought i’d share the wealth…
Edit your wordpress.conf and ensure these lines are there
|
|
Options Indexes MultiViews FollowSymLinks AllowOverride FileInfo |
Example of an httpd.conf using bitnami stack in windows server 2003:
|
|
Alias /wordpress/ "C:/Program Files/BitNami WAMPStack/apps/wordpress/htdocs/" Alias /wordpress "C:/Program Files/BitNami WAMPStack/apps/wordpress/htdocs" Options Indexes MultiViews FollowSymLinks AllowOverride FileInfo Order allow,deny Allow from all |
Next step is to edit your .htaccess file to look like this:
|
|
# BEGIN WordPress RewriteEngine On RewriteBase /wordpress/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /wordpress/index.php [L] # END WordPress |
Go to settings -> permalinks . . . → Read More: HowTo: Fix Permalinks in WordPress
|
|