Hello,
Il 08/09/2015 17:23, Attila-Mihaly Balazs ha scritto:
Hello all,
I'm trying to set up apache + uwsgi on a personal server (you can see most of
the setup at [1]) and run into the following problems:
>
- mod_proxy_uwsgi doesn't seem to work correctly at the moment: If I specify
"ProxyPass unix:/run/uwsgi/app/site/socket|uwsgi://" (this is inside of a
location block, so need for the initial path) I will get "error parsing URL //:
Invalid host/port" in the apache logs when I try to access that URL. If I try to
change the final part (ie. "|uwsgi://" to "|uwsgi://localhost/"), it just tries
to connect through TCP. I would really prefer unix sockets to TCP since they can
be secured better.
There's a bug about mod_proxy_uwsgi not working with unix sockets in debian:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=752783
Documentation says unix sockets should be working since apache 2.4.9:
http://uwsgi-docs.readthedocs.org/en/latest/Apache.html#mod-proxy-uwsgi
- after seeing the above issue I tried to change over to TCP, however it seems
that mod_proxy_uwsgi doesn't parse the port number from the URL. Ie. even if I
specify "ProxyPass uwsgi://127.1.0.1:3001/ <http://127.1.0.1:3001/>", it will
try to connect on port 3031 which seems to be the default port [2]. A quick
glance at the code seems to indicate that that ie *does* parse the port part
[3], so I'm not sure what goes wrong there. Using multiple ports would be
essential (or getting unix sockets working) since I want to run multiple apps /
domains on the server with uwsgi.
In the aforementioned bug tcp sockets are reported working though.
Does passing the path to your ProxyPass directives change something? All
examples in the documentation have it.
The server is a stock Ubuntu 15.04 server with all the software installed from
the official repos. Ie:
- apache2: 2.4.10-9ubuntu1.1
- apache2-mpm-event: 2.4.10-9ubuntu1.1
- libapache2-mod-proxy-uwsgi: 2.0.7-1ubuntu2
- uwsgi: 2.0.7-1ubuntu2
- uwsgi-plugin-php: 2.0.7-1ubuntu2
Thank you for your time!
[1] https://github.com/gpanther/vps-ansible
[2] https://github.com/unbit/uwsgi/blob/master/apache2/mod_proxy_uwsgi.c#L54
[3] https://github.com/unbit/uwsgi/blob/master/apache2/mod_proxy_uwsgi.c#L75
--
Riccardo Magliocchetti
@rmistaken
http://menodizero.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi