randys.org

Wasting your precious bandwidth since 1999

Posts Tagged ‘mongrel’

Apache2: mod_rewrite vs. mod_proxy

I can’t quite figure this out. I’m trying to write a simple rule to force randys.org to redirect to www.randys.org but it’s not realy working. Of course, I haven’t tried it on a vhost that isn’t proxying request to mongrel. Here’s the rule:

RewriteEngine On
RewriteCond %{HTTP_HOST}    !^www.randys.org$ [NC]
RewriteCond %{HTTP_HOST}    !^$
RewriteRule ^/(.*)          http://www.randys.org/$1 [R=301,L]

Anyone?

• • •

Typo, Apache & Mongrel, Oh My!

Wow. I’ve been testing the possibility of running Typo on my VPS with the pre-notion that it just wouldn’t work very well. I think I may be wrong. It’s been running for about a week while I tweak some shit and so far, my memory performance has been stable. Of course, thing would probably be different if I threw some real traffic at it… but, then again, I don’t get a lot of that.

The Setup

Initially, I was going to use lighty + fastcgi to serve up the Rails application. So, I had setup lighty to serve up my PHP/MySQl sites and that worked just fine. Then I started reading up on Mongrel and wanted to see what all the hubub was about. But then I got to reading the Mongrel site (more specifically the part where he says don’t use lighty and mod_proxy).

Crap.

Aight, so back to Apache and their proxy setup. no biggie. I racked my brain for several hours one night trying to figure out why the hell I kept getting these 403 Forbidden errors in Apache. Hours. After the millionth Google search, I finally found the issue: The mod_proxy configuration in Ubuntu is turned off by default (well, not really turned off… it just denies traffic to the proxy server).

 8     <Proxy *>
 9         Order deny,allow
10         #Deny from all
11         Allow from .randys.org
12     </Proxy>

Line 8 was initially not commented out. I had to comment that out and add the Allow from .randys.org bit.

Once I got that changed and reloaded Apache, everything is working nicely together.. even PHP.

The Tweaks

So far, the only tweaks I’ve managed to make is to the flickr Sidebar plugin. It now uses Lightbox V2. That was a bit tricky, considering I don’t really know Ruby but, it all worked out in the end.

As I figure out more stuff to do, I’ll post more.

• • •

All content Copyright © Randy Sesser | Hosted by WebFaction
Entries (RSS) | Comments (RSS)