Forward Apache to Django dev server

Posted by Alex Jillard on Server Fault See other posts from Server Fault or by Alex Jillard
Published on 2010-03-08T16:49:16Z Indexed on 2010/03/08 16:51 UTC
Read the original article Hit count: 432

Filed under:
|
|

I'm trying to get apache to forward all requests on port 80 to 127.0.0.1:8000, which is where the django dev server runs. I think I have it forwarding properly, but there must be an issue with 127.0.0.1:8000 not being run by apache?

I'm running the django dev server in an ubuntu vmware instance, and I'd other people in the office to see the apps in development without having to promote anything to our actual dev/staging servers.

Right now the virtual machine picks up an IP for itself, and when I point a browser to that url with the defualt apache config, I get the default apache page.

I've since changed the httpd.conf file to the following to try and get it to forward the requests to the django dev server:

ServerName localhost

<Proxy *>
    Order deny,allow
    Allow from all
</Proxy>

<VirtualHost *>
    ServerName  localhost
    ServerAdmin [email protected]

    ProxyRequests off
    ProxyPass * http://127.0.0.1:8000
</VirtualHost>

All I get are 404s with this, and in error.log I get the following (192.168.1.101 is the IP of my computer 192.168.1.142 is the IP of the virtual machine):

[Mon Mar 08 08:42:30 2010] [error] [client 192.168.1.101] File does not exist: /htdocs

© Server Fault or respective owner

Related posts about apache

Related posts about vmware