[GH-ISSUE #23] Doc add-on: how-to run via uwsgi and nginx #16

Closed
opened 2026-02-26 10:35:33 +03:00 by kerem · 2 comments
Owner

Originally created by @piwats on GitHub (Apr 14, 2016).
Original GitHub issue: https://github.com/PowerDNS-Admin/PowerDNS-Admin/issues/23

Hello,

maybe it can be of some use for you:

.ini for uwsgi:
(Be advised to change the plugins = python27 to whatever is correspondent with your setup of uwsgi)

[uwsgi]
plugins = python27

uid=nginx
gid=nginx

pythonpath = /the_place_of/PowerDNS-Admin/
virtualenv = /the_place_of/PowerDNS-Admin/flask

module = app
callable = app

master = true
vacuum = true
harakiri = 20
#lazy-apps = true
max-requests = 2500
buffer-size = 32768
post-buffering = 8192
socket = /run/%n.socket
chown-socket = nginx

#workers = 4
#threads = 2

daemonize = /var/log/uwsgi/%n.log

# set cheaper algorithm to use, if not set default will be used
cheaper-algo = spare
# minimum number of workers to keep at all times
cheaper = 2
# number of workers to spawn at startup
cheaper-initial = 2
# maximum number of workers that can be spawned
workers = 15
# how many workers should be spawned at a time
cheaper-step = 1

enable-threads


route-run = fixpathinfo:

thunder-lock

nginx:

        location /pdns/ {
                include uwsgi_params;
                uwsgi_pass unix:/run/THE_PART_BEFORE_ini_of_your_uwsgi.ini_file.socket;
                uwsgi_param UWSGI_SCHEME https;
                uwsgi_param SCRIPT_NAME /pdns;
        }

        location /pdns/static/ {
               alias /the_place_of/PowerDNS-Admin/app/static/;
        }
Originally created by @piwats on GitHub (Apr 14, 2016). Original GitHub issue: https://github.com/PowerDNS-Admin/PowerDNS-Admin/issues/23 Hello, maybe it can be of some use for you: .ini for uwsgi: (Be advised to change the `plugins = python27` to whatever is correspondent with your setup of uwsgi) ``` [uwsgi] plugins = python27 uid=nginx gid=nginx pythonpath = /the_place_of/PowerDNS-Admin/ virtualenv = /the_place_of/PowerDNS-Admin/flask module = app callable = app master = true vacuum = true harakiri = 20 #lazy-apps = true max-requests = 2500 buffer-size = 32768 post-buffering = 8192 socket = /run/%n.socket chown-socket = nginx #workers = 4 #threads = 2 daemonize = /var/log/uwsgi/%n.log # set cheaper algorithm to use, if not set default will be used cheaper-algo = spare # minimum number of workers to keep at all times cheaper = 2 # number of workers to spawn at startup cheaper-initial = 2 # maximum number of workers that can be spawned workers = 15 # how many workers should be spawned at a time cheaper-step = 1 enable-threads route-run = fixpathinfo: thunder-lock ``` nginx: ``` location /pdns/ { include uwsgi_params; uwsgi_pass unix:/run/THE_PART_BEFORE_ini_of_your_uwsgi.ini_file.socket; uwsgi_param UWSGI_SCHEME https; uwsgi_param SCRIPT_NAME /pdns; } location /pdns/static/ { alias /the_place_of/PowerDNS-Admin/app/static/; } ```
kerem 2026-02-26 10:35:33 +03:00
Author
Owner

@piwats commented on GitHub (Apr 21, 2016):

virtualenv = /the_place_of/PowerDNS-Admin/flask was changed in accordance with #22

<!-- gh-comment-id:212851012 --> @piwats commented on GitHub (Apr 21, 2016): `virtualenv = /the_place_of/PowerDNS-Admin/flask` was changed in accordance with #22
Author
Owner

@ivanfilippov commented on GitHub (Jun 10, 2016):

Documentation added here: https://github.com/ngoduykhanh/PowerDNS-Admin/wiki/uWSGI-example

<!-- gh-comment-id:225068125 --> @ivanfilippov commented on GitHub (Jun 10, 2016): Documentation added here: https://github.com/ngoduykhanh/PowerDNS-Admin/wiki/uWSGI-example
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/PowerDNS-Admin-PowerDNS-Admin#16
No description provided.