it looks like your apache isn't behaving like a reverse proxy, it's tacking 
its own HTTP response headers on the front, so the mojo-generated headers 
become part of the content

have you read 
http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#Apache-mod_proxy ?

i use this setup with apache 2.2 -- serve some static files directly and 
pass everything else to mojo daemon (hypnotoad or morbo) on port 3103. you 
don't need the last line unless you're using ssl in your apache vhost

    ProxyRequests Off
    ProxyPreserveHost On
    # no reason to run static files through mojo...
                DocumentRoot /projectroot/public
                ProxyPass /static !     
                ProxyPass /apple-touch-icon-precomposed.png !   
                ProxyPass /apple-touch-icon.png !       
                ProxyPass /favicon.ico !
                ProxyPass /robots.txt !
    #
    # proxy everything else to mojo daemon
                ProxyPass / http://localhost:3103/ keepalive=On
                ProxyPassReverse / http://localhost:3103/
    # set header that allows mojo to correctly construct https:// urls
                RequestHeader set X-Forwarded-HTTPS "1"


jay



On Wednesday, January 14, 2015 at 3:22:47 PM UTC-5, Juanjo Diaz wrote:
>
> Hi all,
>
> I recently release my mojolicious app using apache as a reverse proxy. It 
> works as a charm except from one bit that instead of returning the normal 
> markup it is returning 
>
> HTTP/1.1 Queued Connection: keep-alive
> Content-Type: text/html;charset=UTF-8
> Server: Mojolicious (Perl)
> Date: Wed, 14 Jan 2015 20:19:09 GMT
> Content-Length: 2627
>
> <!DOCTYPE html>
>
> ********* REST OF MY CONTENT *********
>
>
>
> So the page is not rendering.....
>
>
> Any idea of why is that happening and what can I do to avoid it?? There is a 
> redirect in that URLs if there is no bakcslash but the error seems to be 
> happening even with no redirect.
>
>
> I have the $ENV{MOJO_REVERSE_PROXY} variable set to 1 anyway.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to