** Description changed: - 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. + == SRU == + Reproduction: + + === demo.conf === + <VirtualHost *:80> + ServerName localhost + + ProxyPass / unix:/run/demo.sock|uwsgi://demo/ + </VirtualHost> + + === demo.ini === + [uwsgi] + plugin = python3 + socket = /run/demo.sock + umask = 0111 + wsgi-file = demo.py + + === demo.py === + def application(env, start_response): + start_response('200 OK', [('Content-Type','text/html')]) + return [b"Hello World"] + + === Steps === + 1. apt install apache2 libapache2-mod-proxy-uwsgi uwsgi-plugin-python3 + 2. a2enmod proxy_uwsgi + 3. rm /etc/apache2/sites-enabled/000-default.conf + 4. cp demo.conf /etc/apache2/sites/enabled + 5. service apache2 restart (. /etc/apache2/envvars; apache2) + 6. uwsgi --ini demo.ini + 7. curl http://localhost/ + + Success: Hello World + + Failure: A 502 Proxy Error, with this in the logs: + DNS lookup failure for: demo returned by / + + + == ORIGINAL REPROT == + 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. The problem is fixed (at least for me) by the patch from the mailing list: http://lists.unbit.it/pipermail/uwsgi/2015-September/008185.html (I also let Debian know about this, so perhaps the fix will come from upstream - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=752783#35). There is also a workaround: use "vanilla" mod_proxy_http over unix domain sockets: ProxyPass "/foo" "unix:/var/run/uwsgi/foo.socket|http://uwsgi-uds-foo/" PS. Apparently, if you have multiple instances of uwsgi you want to connect to, you need to specify different names for them (ie. "http ://uwsgi-uds-foo/", "http://uwsgi-uds-bar/", etc), having just different paths to the sockets will not work.
** Also affects: uwsgi (Ubuntu Xenial) Importance: Undecided Status: New ** Changed in: uwsgi (Ubuntu) Status: Confirmed => Fix Released ** Changed in: uwsgi (Ubuntu Xenial) Importance: Undecided => Medium ** Changed in: uwsgi (Ubuntu Xenial) Status: New => In Progress -- You received this bug notification because you are a member of नेपाली भाषा समायोजकहरुको समूह, which is subscribed to Xenial. Matching subscriptions: Ubuntu 16.04 Bugs https://bugs.launchpad.net/bugs/1501854 Title: mod_proxy_uwsgi doesn't work with unix domain sockets Status in uwsgi package in Ubuntu: Fix Released Status in uwsgi source package in Xenial: In Progress Status in uwsgi package in Debian: Unknown Bug description: == SRU == Reproduction: === demo.conf === <VirtualHost *:80> ServerName localhost ProxyPass / unix:/run/demo.sock|uwsgi://demo/ </VirtualHost> === demo.ini === [uwsgi] plugin = python3 socket = /run/demo.sock umask = 0111 wsgi-file = demo.py === demo.py === def application(env, start_response): start_response('200 OK', [('Content-Type','text/html')]) return [b"Hello World"] === Steps === 1. apt install apache2 libapache2-mod-proxy-uwsgi uwsgi-plugin-python3 2. a2enmod proxy_uwsgi 3. rm /etc/apache2/sites-enabled/000-default.conf 4. cp demo.conf /etc/apache2/sites-enabled/ 5. service apache2 restart lazy chroot option: (. /etc/apache2/envvars; apache2) 6. uwsgi --ini demo.ini 7. curl http://localhost/ Success: Hello World Failure: A 502 Proxy Error, with this in the logs: DNS lookup failure for: demo returned by / == ORIGINAL REPROT == 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. The problem is fixed (at least for me) by the patch from the mailing list: http://lists.unbit.it/pipermail/uwsgi/2015-September/008185.html (I also let Debian know about this, so perhaps the fix will come from upstream - https://bugs.debian.org/cgi- bin/bugreport.cgi?bug=752783#35). There is also a workaround: use "vanilla" mod_proxy_http over unix domain sockets: ProxyPass "/foo" "unix:/var/run/uwsgi/foo.socket|http://uwsgi-uds- foo/" PS. Apparently, if you have multiple instances of uwsgi you want to connect to, you need to specify different names for them (ie. "http ://uwsgi-uds-foo/", "http://uwsgi-uds-bar/", etc), having just different paths to the sockets will not work. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/uwsgi/+bug/1501854/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~group.of.nepali.translators Post to : group.of.nepali.translators@lists.launchpad.net Unsubscribe : https://launchpad.net/~group.of.nepali.translators More help : https://help.launchpad.net/ListHelp