Coder Social home page Coder Social logo

Comments (9)

kraih avatar kraih commented on July 20, 2024

The wiki might be of help. (https://github.com/kraih/mojo/wiki/Apache-deployment)
But patches are always welcome.

from mojo.

xbergade avatar xbergade commented on July 20, 2024

Using ScriptAliasMatch /* /home/dimka/work/test/test.mojo instead of ScriptAlias / ... in the Apache config solves the 404 problem, unfortunately Mojolicious::Lite then seems to get confused and only the / route gets triggered, regardless of the URL. To get around that, add a $ENV{'SCRIPT_NAME'} = '/' before your app->start('cgi') line, as per Sergey Sinkovsk tip.

I'm 99% sure this used to work fine without the ENV hack during the 0.99XXX series, seems that with v1.01 the ENV hack is required.

from mojo.

kraih avatar kraih commented on July 20, 2024

That might be fixed in 1.02.

from mojo.

xbergade avatar xbergade commented on July 20, 2024

It's not fixed in 1.1, and worse: the 1.01 hack doesn't work anymore!
It seems that mojo in that configuration is completely ignoring (or not using?) the REQUEST_URI or SCRIPT_NAME env keys, which are (in my tests) both clearly set to the URL, so I'd expect the route subsystem to kick in.

Has anyone found other workaround for 1.1?
Is the original example above not the proper way to do it under Apache?

from mojo.

xbergade avatar xbergade commented on July 20, 2024

Still broken under 1.11 :(

from mojo.

xbergade avatar xbergade commented on July 20, 2024

Found a workaround under 1.11, use this instead in the Apache config:
ScriptAliasMatch /(.*) /home/dimka/work/test/test.mojo/$1

from mojo.

kraih avatar kraih commented on July 20, 2024

I don't see anything broken in Mojolicious, just a normal Apache configuration problem.

from mojo.

xbergade avatar xbergade commented on July 20, 2024

The key is that ScriptAliasMatch /* /home/dimka/work/test/test.mojo used to work fine before the 1.0 series, without any hacks. I guess Mojolicious was using one of the ENV values to figure which route to trigger. Under v1.0+ this no longer works and the workaround is to use ScriptAliasMatch /(.*) /home/dimka/work/test/test.mojo/$1 in the Apache config so that Mojolicious can figure out which route to use.

from mojo.

kraih avatar kraih commented on July 20, 2024

Without a real unit test there is not much i could do, you might even have depended on a bug.

from mojo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.