Robie: Sorry, forgot. I haven't done one of these in a while :)

Added.

** Description changed:

- == SRU ==
- Reproduction:
+ = SRU =
+ 
+ == Impact ==
+ 
+ Using unix domain sockets for getting traffic from Apache to uwsgi is
+ impossible. This is a regression from previous releases.
+ 
+ == Regression Potential ==
+ 
+ Patch is upstream, and that part of the codebase hasn't been touched since. 
Presumably that means it has been well tested by other uwsgi users.
+ It was also previously applied in the Debian/Ubuntu package. It was dropped 
by accident.
+ 
+ The patch only applies to the mod_proxy_uwsgi module, so no other bits
+ of uwsgi should be affected (it does build *many* binaries and
+ packages).
+ 
+ == Test Case ==
  
  === 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)
+    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 ==
+ = 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.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1501854

Title:
  mod_proxy_uwsgi doesn't work with unix domain sockets

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/uwsgi/+bug/1501854/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to