My Dancer app fails under uWSGI (2.0.7) + Apache (2.4.10) combination while it runs freely in other environments ( uWSGI + nginx, Starman + Apache, Dancer own dev-server). I don't find in logs any meaningful information. So I made simple test app like
$ dancer -a tset
Then copied default production.yml
into uwsgi.yml
, linked bin/app.pl
into bin/app.psgi
created tset.ini
like this:
[uwsgi]
plugins = psgi
socket = 127.0.0.1:3033
uid = www
gid = www-data
chdir = /home/www/apps/tset/bin/
psgi = app.psgi
processes = 1
master = true
Made this ini available for uWsgi in /etc/uwsgi/apps-available
, linked it into /etc/uwsgi/apps-enabled
.
Restarted uwsgi
service.
Then for Apache (2.4.10) module mod-proxy-uwsgi
added few lines into my virtualhost conf:
ProxyPass /adm/y uwsgi://127.0.0.1:3033/
This seems most fragile point, because I feel like I need to set uWSGIModifier1 5
here but did not figured out where and how?
Restarted Apache and got "Internal Server Error". In uwsgi log I see just:
Tue Jan 19 02:10:36 2016 - spawned uWSGI worker 1 (pid: 21712, cores: 1)
Tue Jan 19 02:10:56 2016 - -- unavailable modifier requested: 0 --
Tue Jan 19 02:24:44 2016 - -- unavailable modifier requested: 0 --
Tue Jan 19 02:27:14 2016 - -- unavailable modifier requested: 0 --
Tue Jan 19 02:27:17 2016 - -- unavailable modifier requested: 0 --
What is this "unavailable modifier requested"?
In apache error.log is no entries, in access.log are entries, but no other information than status 500.
Such behavior is reproducible with steps above, so I hope you figure out, what is wrong in this combination?
0:psgi
I have a little progress. In uwsgi log is now--- unable to find perl application ---
and another messy line[pid: 5757|app: -1|req: -1/1] 212.7.22.161 () {66 vars in 1511 bytes} [Sat Jan 23 00:07:15 2016] GET /adm/z/ => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0)
Here I see, that resonse is 21 bytes, what is length of "Internal server error". Do you have any hints more, why Perl app is not found under Apache here? – Ameline