First time here? Check out the FAQ!
2

How to configure Askbot with Nginx and uWSGI?

Please provide me a Nginx Configuration for AskBot file located at /etc/nginx/sites-available/ directory

gopalraha's avatar
332
gopalraha
asked 2017-01-18 11:20:42 -0600, updated 2017-01-25 10:30:01 -0600
edit flag offensive 0 remove flag close merge delete

Comments

Dear @Evgeny Please **tag** this question with **nginx** tag Regards

gopalraha's avatar gopalraha (2017-01-25 09:55:51 -0600) edit

@gopalraha is retag function not working for you?

Evgeny's avatar Evgeny (2017-01-25 09:57:10 -0600) edit

Yes!!! Its not working for me..

gopalraha's avatar gopalraha (2017-01-25 10:01:46 -0600) edit

What browser are you using?

Evgeny's avatar Evgeny (2017-01-25 10:04:14 -0600) edit

I forget to **tag** the question when I have ask the question here. When I use the **retag** function it won't works anymore.

gopalraha's avatar gopalraha (2017-01-25 10:07:13 -0600) edit
add a comment see more comments

1 Answer

3

I use uwsgi with nginx

This is my nginx configuration:

server {
        listen 80;
        server_name ldstw.org www.ldstw.org;
        location / {
        include         uwsgi_params;
        uwsgi_pass      unix:/home/s930029/GospelForum/askbot.sock;
   }
}

This is my uwsgi configuration

[uwsgi]
project = askbot
base = /home/s930029
static-map = /m=/home/s930029/GospelForum/static
chdir = %(base)
home = /home/s930029/.virtualenvs/askbot/
wsgi-file = /home/s930029/GospelForum/django.wsgi
master = true
processes = 5
threads = 2

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

socket = %(base)/GospelForum/askbot.sock
chmod-socket = 664
setuid  = www-data
setgid = www-data
vacuum = true

My /etc/systemd/system/uwsgi.service

[Unit]
Description=uWSGI Emperor service

[Service]
ExecStartPre=/bin/bash -c 'mkdir -p /run/uwsgi; chown s930029:www-data /run/uwsgi'
ExecStart=/usr/local/bin/uwsgi --emperor /etc/uwsgi/sites
Restart=always
KillSignal=SIGQUIT
Type=notify
NotifyAccess=all

[Install]
WantedBy=multi-user.target

For explanation: see https://www.digitalocean.com/communit...

AaronHuang's avatar
113
AaronHuang
answered 2017-01-20 02:44:18 -0600, updated 2017-01-21 07:33:38 -0600
edit flag offensive 0 remove flag delete link

Comments

Thanks for info. Please provide me '/etc/systemd/system/uwsgi.service' contents

gopalraha's avatar gopalraha (2017-01-21 07:25:47 -0600) edit

@gopalraha I have modified my answer.

AaronHuang's avatar AaronHuang (2017-01-21 07:35:41 -0600) edit

@AaronHuang Thanks a lot :) friend

gopalraha's avatar gopalraha (2017-01-22 10:58:57 -0600) edit

one last question "home = /home/s930029/.virtualenvs/askbot/" is your python virtualenv path or something else.

gopalraha's avatar gopalraha (2017-01-22 11:01:09 -0600) edit

Yes, it's my python virtualenv path.

AaronHuang's avatar AaronHuang (2017-01-22 21:03:12 -0600) edit
add a comment see more comments