Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Mojolicious, apache reverse proxy

by trwww (Priest)
on Sep 21, 2019 at 04:09 UTC ( #11106461=note: print w/replies, xml ) Need Help??


in reply to Mojolicious, apache reverse proxy

Would love to see an answer of substance. Any time I've tried to get web apps to work under a "relative" URI scheme in all of the frameworks I've ever tried, bugs crawl out of the woodwork.

I've long given up on the concept and build my apps to assume that they run under an "absolute" path, with the first part of the path like "/appname".

Replies are listed 'Best First'.
Re^2: Mojolicious, apache reverse proxy
by Your Mother (Bishop) on Sep 21, 2019 at 04:18 UTC

    Really? Itís semi-trivial in Catalyst and, to my knowledge but not experience, Mojolicious too. In Catalyst itís just ensuring you only use uri_for or especially uri_for_action because it errors on non-existent dispatch paths (also uri_with) to construct all URIs. They are all relative to the app base in that case.

      I'll freely admit that the most likely scenario is that I'm just dumb, and like I say its been a long time since I tried it, but re: uri_for and friends I feel like I remember it working but then my chains being busted because they choke on the prefix of the endpoint and/or other weird stuff. And OP has an example of stuff not working in Mojolicious in this very node, no?

      So I've ended up with a convention (that at this point I've cargo-culted from myself), using OPs example, like:

      ProxyPass /rules http://localhost:3000/rules keepalive=On ProxyPassReverse /rules http://localhost:3000/rules

        I didnít even really read the OP. I donít have apache running on my Mac at this pointójust nginxóand I have little mojo experience and less taste for untangling deployment problems. I did just really read it and have an untested suggestion I think Iíll post.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11106461]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2020-09-27 14:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (142 votes). Check out past polls.

    Notices?