6

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!

Беров
  • 1,335
  • 10
  • 22

2 Answers2

6

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.

Ashley
  • 4,322
  • 2
  • 17
  • 28
  • 1
    Well, thanks, this is good advise. I will try and make a complete example which I will put in my project and then link it here so people can enjoy it. Thanks again ! – Беров Aug 11 '11 at 08:16
1

see also the Mount Plugin which allows you to add one mojolicious app within another