Apache ProxyPass with dynamic hostname

To use Apache ProxyPass directives with dynamic hostnames you will need to also use ModRewrite.

Objective

All requests to the virtualhost will ProxyPass and ProxyPassReverse (also known as an “Apache Gateway”) to the %{HTTP_HOST}

The only reason this would make sense to do is if you have localhost entries on the apache server for specfic . . . → Read More: Apache ProxyPass with dynamic hostname

parse apache access log entries to find top user agents, top urls and top IPs

This script will allow you to see the top user agents, urls, IPs for your log files:

 

Script name: ls-httpd

#!/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 . . . → Read More: parse apache access log entries to find top user agents, top urls and top IPs

redhat apache start on boot

if you already have apache installed on redhat linux

# chkconfig httpd on # /etc/init.d/httpd start

How to Install Subversion 1.4.6 with Apache 2.2.17_1 on FreeBSD

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

Howto Fix libaprutil-0.so.9 not found

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 . . . → Read More: Howto Fix libaprutil-0.so.9 not found

Proper way to Rebuild Subversion 1.4.0_1 on FreeBSD 6.1

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 . . . → Read More: Proper way to Rebuild Subversion 1.4.0_1 on FreeBSD 6.1

restart apache redhat

/etc/rc.d/init.d/httpd restart

Howto: Fix WP Super Cache Manager Cache Directory Writable Error

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 . . . → Read More: Howto: Fix WP Super Cache Manager Cache Directory Writable Error

HowTO: Fix Vulnerability “SSLv2 Enabled”

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

HowTo: Fix Permalinks in WordPress

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 . . . → Read More: HowTo: Fix Permalinks in WordPress