I have some Mojolicious-based apps which happily run under Apache2 with mod_cgi and mod_fastcgi.
The urls are for example:
http://example.org/oneapp/path/info?foo=bar
http://example.org/oneapp?foo=bar
http://example.org/secondapp/path/info?foo=bar
http://example.org/thirdapp/path/info?baz=heh
#etc...
I had relative success configuring the apps as subdomains using proxy_pass but I would like to keep the old urls(just switch from apache2 to nginx). I would like to keep the same urls but run the apps using nginx. What should my configuration look like and how should I run the apps.
Thanks in advance!
Since you haven’t got an answer, I’ll give a correct, but entirely half-baked and code-free, solution. Check the Mojolicious::Guides::Cookbook for nginx and Plack deployment. Mix this with Plack::Builder for deploying multiple applications on the same server. I’d go with Starman as the server engine probably but that is up to you and your specific needs.
That’s basically it. Sorry I don’t have code for you but that should do exactly what you want once you get through each step; the docs are good and can be supplemented with blog posts from various Perl devs.
see also the Mount Plugin which allows you to add one mojolicious app within another
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With