Example for several (fastcgi / uwsgi / scgi / proxy_pass) Mojolicious applications on the same nginx virtual host?

I have Mojolicious based applications that happily work under Apache2 with mod_cgi and mod_fastcgi.

URLs 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 in setting up applications 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 applications using nginx. What should my configuration look like and how do I run applications.

Thanks in advance!

+6
source share
2 answers

Since you have no answer, I will give the correct one, but completely semi-white and without code. Check out Mojolicious :: Guides :: Cookbook for nginx and Plack . Mix this with Plack :: Builder to deploy multiple applications on the same server. I'd go with Starman as a server, maybe it is up to you and your specific needs.

Here is basically it. Sorry, I don’t have the code for you, but it should do exactly what you need when you go through each step; the docs are good and can be complemented by blog posts from various Perl developers.

+6
source

see also Mount Plugin , which allows you to add one mojolic application to another

+1
source

Source: https://habr.com/ru/post/894475/


All Articles