On 8 June 2012 16:18, AbrahamLinksys <[email protected]> wrote:
> I think you forgot the trailing slash on ProxyPass:
>
> ProxyPass http://localhost:8000/
>
> That's why the DNS lookup failed I think: Reason: <strong>DNS lookup failure
> for: localhost:8000welcome</strong></p></p>
>

I was sure I'd tried that, along with a dozen other things which
didn't work. Works now though, thanks.

Robin

>
>
> On Friday, June 8, 2012 6:01:21 AM UTC-5, Robin Wood wrote:
>>
>> Hi
>> I'm trying to setup apache to proxy traffic into web2py. I've followed the
>> instructions I can find but I'm getting problems.
>>
>> I've got the following in my apache config
>>
>> ProxyRequests off
>> <location />
>>         ProxyPass http://localhost:8000
>>         ProxyPassReverse /
>> </location>
>>
>> Which is successfully redirecting from localhost port 80 to web2py on port
>> 8000.
>>
>> root@web2py:~# curl localhost -v
>> * About to connect() to localhost port 80 (#0)
>> *   Trying 127.0.0.1... connected
>> > GET / HTTP/1.1
>> > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0
>> > OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
>> > Host: localhost
>> > Accept: */*
>> >
>> < HTTP/1.1 303 SEE OTHER
>> < Date: Fri, 08 Jun 2012 10:58:21 GMT
>> < Server: Rocket 1.2.4 Python/2.7.3
>> < Content-Type: text/html; charset=UTF-8
>> < Location: http://localhost/welcome/default/index
>> < Content-Length: 66
>> < Vary: Accept-Encoding
>> <
>> * Connection #0 to host localhost left intact
>> * Closing connection #0
>> You are being redirected <a href="/welcome/default/index">here</a>
>>
>> The problem is the redirection fails
>>
>> curl localhost/welcome/default/index -v
>> * About to connect() to localhost port 80 (#0)
>> *   Trying 127.0.0.1... connected
>> > GET /welcome/default/index HTTP/1.1
>> > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0
>> > OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
>> > Host: localhost
>> > Accept: */*
>> >
>> < HTTP/1.1 502 Proxy Error
>> < Date: Fri, 08 Jun 2012 10:59:34 GMT
>> < Vary: Accept-Encoding
>> < Content-Length: 509
>> < Content-Type: text/html; charset=iso-8859-1
>> <
>> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
>> <html><head>
>> <title>502 Proxy Error</title>
>> </head><body>
>> <h1>Proxy Error</h1>
>> <p>The proxy server received an invalid
>> response from an upstream server.<br />
>> The proxy server could not handle the request <em><a
>> href="/welcome/default/index">GET&nbsp;/welcome/default/index</a></em>.<p>
>> Reason: <strong>DNS lookup failure for:
>> localhost:8000welcome</strong></p></p>
>> <hr>
>> <address>Apache/2.2.22 (Ubuntu) Server at localhost Port 80</address>
>> </body></html>
>> * Connection #0 to host localhost left intact
>> * Closing connection #0
>>
>> For some messing up the hostname and trying to redirect to a host that
>> doesn't exist.
>>
>> This is on a newly installed Ubuntu box and web2py is working fine when
>> just accessed on port 8000.
>>
>> Can anyone tell me what I've done wrong?
>>
>> Thanks
>>
>> Robin
>>
>

Reply via email to