I got uwsgi running behind nginx. All is working fine, but I want to change from nginx to Apache2 with mod_proxy_uwsgi.

I cannot get a connection (access and error.log of appache are blank)

My uwsgi.ini is:

uid = umap
gid = users
chdir           = /srv/umap/
module          = umap.wsgi
home            = /srv/umap/venv
env = UMAP_SETTINGS=/srv/umap/local.py
master          = true
processes       = 4
socket          = /srv/umap/uwsgi.sock
chmod-socket    = 666
stats           = /srv/umap/stats.sock
vacuum          = true
plugins         = python3

my nginx-config

upstream umap {
    server unix:///srv/umap/uwsgi.sock;
server {
    auth_basic "Restricted";
    auth_basic_user_file /etc/nginx/.htpasswd;
    listen      8001;
    listen   [::]:8001;
    charset     utf-8;
    client_max_body_size 5M;   # adjust to taste
    location / {
        uwsgi_pass  umap;
        include     /srv/umap/uwsgi_params;

How is the right code for the pass to the proxy?

<VirtualHost *:8002>
  ErrorLog ${APACHE_LOG_DIR}/8002error.log
  CustomLog ${APACHE_LOG_DIR}/8002access.log combined
    <Proxy *>
        Order deny,allow
        Allow from all
    ProxyRequests Off
    ProxyPass / unix:/srv/umap/uwsgi.sock|uwsgi://uwsgi-uds-app1/
    ProxyVia On
    LogLevel warn

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.