Comments (9)
The wiki might be of help. (https://github.com/kraih/mojo/wiki/Apache-deployment)
But patches are always welcome.
from mojo.
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.
That might be fixed in 1.02.
from mojo.
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.
Still broken under 1.11 :(
from mojo.
Found a workaround under 1.11, use this instead in the Apache config:
ScriptAliasMatch /(.*) /home/dimka/work/test/test.mojo/$1
from mojo.
I don't see anything broken in Mojolicious, just a normal Apache configuration problem.
from mojo.
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.
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)
- The image helper now produces absolute paths HOT 7
- Mojolicious::Lite silently ignores controller configurations due to missing default namespaces HOT 2
- Morbo issues with Mojolicious 9.34 (change in Mojo/Server.pm) HOT 1
- t/mojo/log.t fails when $ENV{PERL_UNICODE} =~ /D/
- can't run mojo file
- running mojo files HOT 2
- TLS Fingerprinting
- Use of uninitialized value $cb in method lookup at Mojo/Reactor/Poll.pm HOT 1
- Can't locate object method "" via package "Mojolicious::Validator::Validation"
- Request with basic auth does not work when passwords include umlaut HOT 4
- Nesting layouts fails
- URL parsed from a serialised request is never absolute
- Websocket - 101 Switching Protocols
- Feeding render with Mojo::ByteStream is broken when gzipping is triggered HOT 4
- Missing SECURITY.md HOT 5
- Minion UI broken by jQuery removal in latest Mojolicious update HOT 2
- Commands error when topic variable set to undef in compilation HOT 3
- mingw-w64 on MSYS2 MINGW64 needs IO 1.51+ to pass tests of Mojolicious HOT 2
- Feature request: Support session cookies with "Partitioned" HOT 3
- Bug in content negotiation when specifying a default format and including it in a call to respond_to() helper HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mojo.