Reverse proxy with Mojolicious

This is my first post to the perl community also if i play with perl since a long time. In my working environment i choose mojolicious as a framework for my web apps but sometimes happens that a bit of php is needed (not obviously by me).
In have more web-apps in an internal network that needed a virtual name dispatcher, i could use nginx or apache mod_proxy but was very odd to me that wasn't a perl software that do that job easily and less painful.
After a little search i found Mojolicious::Plugin::Proxy but didn't have support for cookie so i was really unhappy :(
So i developed a little reverse proxy using mojolicious (so can leverage the hypnotoad workers management out of the box).
Mojolicious is so fun with a couple of lines you just accomplish your job.
With 6 lines you have your request cloned and dispatched.
Now the software reads YAML files to define configured virtual host and its routes.
The project it's not intended as a Mojolicious::Plugin because i think that with a bit of community effort this software can become a light webapp deployer and manager (that i felt it's missing out there).
If you are interested, and you may find it useful like me, bugfixes and developers are welcome :)
The project is hosted on Github

5 Comments

Nice solution, but if you were unhappy Mojolicious::Plugin::Proxy was missing a feature, why not submit a patch, or even just a feature request?

But if you get in touch with the author, then he/she just might add your code. Then you'll experience the joy of being an open source contributor :)

Leave a comment

About mudler

user-pic started learning perl since i was 14, i still love/hate it. Love because you can do whatever you want with it and now i use it everyday for every task