[Flask] Uwsgi emperor socket creation permissions
Corey Boyle
coreybrett at gmail.com
Sat May 25 12:10:48 EDT 2019
Thank you for the suggestion. I've read that the uwsgi binary protocol via
a Unix sockit is more efficient than HTTP. So I'd like to have my cake and
eat it too. ;-) HTTP may be my fallback plan if I can't figure this out.
On Sat, May 25, 2019 at 11:52 AM Rodrigo Ramírez Norambuena <
decipher.hk at gmail.com> wrote:
> On Sat, May 25, 2019 at 9:51 AM Corey Boyle <coreybrett at gmail.com> wrote:
> >
> > [...]
> >
> > I tried using chown-socket = appuser:www-data, but that doesn't work
> > because appuser is not a member of the www-data group and therefore
> > can't set is as group.
> >
> >
> > Any suggestions?
>
> You could running a wsgi process in http mode and Nginx get from this
> backend as proxy pass.
>
> Here a little example:
>
> [uwsgi]
> socket= 0.0.0.0:5000
> protocol=http
> master = true
> venv = /usr/local/apps/qpanel/env
> chdir = /usr/local/apps/qpanel
> mount = /qpanel=start.wsgi
> manage-script-name = true
> uid = x
> gid = x
> plugins = python
>
> Nginx
> location /qpanel {
>
> proxy_pass http://localhost:5000/qpanel;
> proxy_set_header Host $host;
> proxy_set_header X-Real-IP $remote_addr;
>
> }
> Regards!
> --
> Rodrigo Ramírez Norambuena
> http://www.rodrigoramirez.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20190525/e679e700/attachment.html>
More information about the Flask
mailing list