1

EDIT:

I just went with Nginx to do the proxy in front of Apache. Much easier to set up and it actually worked.


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 alex@example.com

    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
Alex Jillard
  • 93
  • 1
  • 10
  • Which VMware product? Please consider changing the [vmware] tag on this with a product specific tag. This helps us better categorise questions. – Ben Pilbrow May 04 '11 at 19:45

3 Answers3

0

Is that better?

<VirtualHost *>
    ServerName  localhost
    ServerAdmin alex@example.com

ProxyRequests Off

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

ProxyPass *  http://127.0.0.1:8000
ProxyPassReverse *  http://127.0.0.1:8000
</VirtualHost>

Did you restart apache? Is the error message still about the directory??

Alexandre Nizoux
  • 498
  • 1
  • 4
  • 15
0

ProxyPass takes a path not a wildcard, try

ProxyPass /  http://127.0.0.1:8000
ProxyPassReverse /  http://127.0.0.1:8000
jamespo
  • 1,698
  • 12
  • 12
0

To check whats running on 127.0.0.1 (8000) you can:

curl -I http://127.0.0.1:8000 | grep Server

If it's apache, then other web servers should not start ok. But looking your answers to other solutions we can suspect on that.

If it's apache, just search/edit the Listen lines, to 192.168.1.142:80

poisonbit
  • 797
  • 4
  • 6