Ask Your Question
2

How to configure Askbot with Nginx and uWSGI?

asked 2017-01-18 11:20:42 -0500

updated 2017-01-25 10:30:01 -0500

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

edit retag flag offensive close merge delete

Comments

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

gopalraha gravatar imagegopalraha ( 2017-01-25 09:55:51 -0500 )edit

@gopalraha is retag function not working for you?

Evgeny gravatar imageEvgeny ( 2017-01-25 09:57:10 -0500 )edit

Yes!!! Its not working for me..

gopalraha gravatar imagegopalraha ( 2017-01-25 10:01:46 -0500 )edit

What browser are you using?

Evgeny gravatar imageEvgeny ( 2017-01-25 10:04:14 -0500 )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 gravatar imagegopalraha ( 2017-01-25 10:07:13 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2017-01-20 02:44:18 -0500

AaronHuang gravatar image

updated 2017-01-21 07:33:38 -0500

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...

edit flag offensive delete link more

Comments

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

gopalraha gravatar imagegopalraha ( 2017-01-21 07:25:47 -0500 )edit

@gopalraha I have modified my answer.

AaronHuang gravatar imageAaronHuang ( 2017-01-21 07:35:41 -0500 )edit

@AaronHuang Thanks a lot :) friend

gopalraha gravatar imagegopalraha ( 2017-01-22 10:58:57 -0500 )edit

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

gopalraha gravatar imagegopalraha ( 2017-01-22 11:01:09 -0500 )edit

Yes, it's my python virtualenv path.

AaronHuang gravatar imageAaronHuang ( 2017-01-22 21:03:12 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-01-18 11:20:42 -0500

Seen: 912 times

Last updated: Jan 25