7

So I'm trying to use uwsgi behind apache2, but I am doing so on a CentOS 6 machine. (I'm use to Debian/Ubuntu based systems for context.)

I used pip install uwsgi and followed the directions for launching uwsgi with a Django application (via http://uwsgi-docs.readthedocs.org/en/latest/WSGIquickstart.html).

I started to configure apache2 as per http://uwsgi-docs.readthedocs.org/en/latest/Apache.html, but it says nothing about where to get or how to build mod_uwsgi or mod_proxy_uwsgi. mod_uwsgi.so definitely isn't on the system anywhere. Any suggestions?

Brandon W. King
  • 188
  • 1
  • 10

1 Answers1

8

It's right at the top of the module's source:

To build:

apxs2 -i -c mod_proxy_uwsgi.c

Apxs2 is apache-2.2 specific, and it may be called apxs on some Unixes. For instance, on CentOS 6:

$ rpm -q -f `which apxs`
httpd-devel-2.2.15-28.el6.centos.x86_64
Steve
  • 96
  • 1
  • 3
    To actually use the module, you will also have to load it in `/path/to/httpd.conf`. Add to the end of the file: `LoadModule proxy_uwsgi_module /usr/lib/apache2/modules/mod_proxy_uwsgi.so` and adjust for your location of `mod_proxy_uwsgi.so` – hughes Jul 31 '15 at 02:52
  • 1
    Additionaly, note that you cannot find this in the uwsgi package. Download with `wget https://raw.githubusercontent.com/unbit/uwsgi/2.0.14/apache2/mod_proxy_uwsgi.c` (replacing with the appropriate version). Also do not forget to `sudo apxs2` for Ubuntu. – Wtower Dec 10 '16 at 08:35