Pickup domain1 and domain2: Oh! I've forgot to document that the matching headers can also take a regex. I will fix that later today.
So... you can either of these works: # use a regex mount "test1" => {Host => qr/domain\d+\.com/}; # ...or mount the same app twice mount "test1" => {Host => "domain1.com"}; mount "test1" => {Host => "domain2.com"}; I don't know why logging doesn't work. It should be something wrong in test1/test2, as long as you don't use logging <https://metacpan.org/pod/Toadfarm::Manual::DSL#logging>(). (But I'm guessing you *don't* use logging(), since it's not part of your example code). The only way for Toadfarm to take over logging from test1/test2 is if you have specified logging {combined=>1}. See also https://metacpan.org/source/JHTHORSEN/Toadfarm-0.55/lib/Toadfarm.pm#L286 and https://metacpan.org/pod/Toadfarm::Manual::DSL#logging On Monday, April 27, 2015 at 11:26:30 AM UTC+2, mjb152 wrote: > > this code works without nginx, and I have 2 questions. > > I'd like to mount the first app to pickup both domain1.com , and > www.domain1.com , currently it doesn't. Is there a way to achieve that ? > Secondly, no logging is being output to the normal log/development.log (in > each app), nor does it go to /var/log/toadfarm , I could combine them both > into 1 log, but I'd like to keep them separate if possible ? > > > *mount "/home/mojouser/apps/test1/script/test1" => { Host => "domain1.com > <http://domain1.com>", };* > *mount "/home/mojouser/apps/test2/script/test2" => { Host => "domain2.com > <http://domain2.com>", };* > > *start ["http://*:80"];* > -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious+unsubscr...@googlegroups.com. To post to this group, send email to mojolicious@googlegroups.com. Visit this group at http://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.