I set up a Django app on WebFaction (using mod_wsgi) and I'm having trouble configuring apache. I'm trying to make it so the site is only accessible from my own IP address (I'm trying to restrict access while I'm setting up and testing the site). In ~/webapps/django/apache2/httpd.conf I included the authz_host module and then added the following configuration:
The site works fine when I don't try to restrict the incoming IPs, but I get a 403 (Forbidden) when I try to include the above (or any variation on it that would restrict the clients address). According to all the apache documentation I've seen this should work. Any ideas; is there something strange about webfaction or am I just doing something stupid?
asked Nov 06 '10 at 13:50
The problem is that, since your Apache is proxied behind our front-end server, when the requests get to your Apache they all come from 127.0.0.1, so you can't do IP checking the normal way.
Instead, you can use
Then, set a variable ('let_in' for example, but you can call it anything you want):
Finally, allow access based on the variable:
Hope that helps!