1

I've just set up a couple of WSGI apps behind an Apache server proxying to uwsgi using UNIX sockets on the same host. The generally advertised method to do that seems to be like this:

Apache config:
ProxyPass / unix:/var/lib/uwsgi/app1.sock|uwsgi://uwsgi-uds-app1/

uwsgi .ini
socket = /var/lib/uwsgi/app1.sock

I've done it a bit differently:

Apache config:
ProxyPass / unix:/var/lib/uwsgi/app1.sock|http://127.0.0.1/

uwsgi .ini
http-socket = /var/lib/uwsgi/app1.sock

So basically in my setup Apache and uwsgi talk back and forth using http instead of uwsgi's native protocol. To me the advantages are that I save one extra dependency (mod_proxy_uwsgi), and that it was easier to debug the whole setup by being able to directly talk to the uwsgi server using curl --unix-socket

So what is the advantage of using the uwsgi protocol? If it's only about performance -- no issue for my low-volume applications.

musbur
  • 193
  • 12

0 Answers0