configuration - was patchwork question

Thomas Monjalon thomas.monjalon at 6wind.com
Fri Nov 6 21:05:04 AEDT 2015


Hi,

2015-11-06 00:00, Thomas F Herbert:
> Thomas,
> 
> I am replicating the DPDK patchwork for upgrading. What user should I 
> run uwsgi as?

On dpdk.org, it is www-data.

> The text file says to put the ini in the user's home directory. Can I 
> assume it doesn't matter?

# cat /root/config/patchwork_uwsgi.ini 
[uwsgi]

# Django-related settings
# the base directory (full path)
chdir           = /srv/patchwork
pythonpath      = /srv/patchwork/apps
# Django's wsgi file
module          = wsgi

master          = true
# maximum number of worker processes
processes       = 5
# increase buffer size to avoid "502 bad gateway error"
# "recv() failed (104: Connection reset by peer) while reading response header from upstream"
buffer-size     = 16384

uid             = www-data
gid             = www-data

daemonize       = /var/log/patchwork.log
pidfile         = /run/patchwork.pid
socket          = /srv/patchwork/patchwork.sock
chmod-socket    = 664

# clear environment on exit
vacuum          = true

> Also nginx goes in ~ too.

# cat /root/config/nginx.conf 
user www-data;
worker_processes 4;
pid /var/run/nginx.pid;

events {
        worker_connections 768;
        # multi_accept on;
}

http {
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;

        gzip on;
        gzip_proxied any;
        gzip_types text/plain text/css text/javascript application/x-javascript
                   text/xml application/xml image/svg+xml
                   application/vnd.ms-fontobject application/x-font-ttf font/opentype;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;

        server {
                root /srv/www;
                index index.html;
                error_page 404 /404.html;

                location ~ /browse(/?.*) {
                        fastcgi_pass unix:/var/run/fcgiwrap.socket;
                        fastcgi_param SCRIPT_FILENAME /var/www/htdocs/cgit/cgit.cgi;
                        fastcgi_param PATH_INFO $1;
                        include fastcgi_params;
                }

                location ~ /git(/.*) {
                        fastcgi_pass unix:/var/run/fcgiwrap.socket;
                        fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
                        fastcgi_param GIT_PROJECT_ROOT /srv/git;
                        fastcgi_param GIT_HTTP_EXPORT_ALL "";
                        fastcgi_param PATH_INFO $1;
                        include fastcgi_params;
                }

                location ~ /dev/patchwork/(css|js|images|admin/(css|js|img))/ {
                        root /srv/patchwork;
                        expires 3h;
                }
                location ~ /dev/patchwork {
                        uwsgi_pass unix:/srv/patchwork/patchwork.sock;
                        uwsgi_param SCRIPT_NAME /dev/patchwork;
                        uwsgi_modifier1 30;
                        include uwsgi_params;
                }

                location ~ /ml/archives {
                        root /var/lib;
                        autoindex on;
                }
                location ~ /ml(/[^/]+)(/?.*) {
                        fastcgi_pass unix:/var/run/fcgiwrap.socket;
                        fastcgi_param SCRIPT_FILENAME /usr/lib/cgi-bin/mailman$1;
                        fastcgi_param PATH_INFO $2;
                        include fastcgi_params;
                }

                location ~ (/.*[^/]) {
                        try_files $1 $1.html =404;
                        expires 3h;
                }
        }
}

> I want to set this up properly. The last time I did this a few months 
> ago, I was just trying to get enough stuff working so I could serve the 
> web page but now I want to "do it right" and replicate dpdk.org 
> patchwork site.
> 
> Thanks in advance,

You are welcome


More information about the Patchwork mailing list