On Wed, Oct 18, 2017 at 7:25 PM, Ajitabh Pandey <ajitabhpan...@gmail.com>
wrote:

>
> On Wed, Oct 18, 2017 at 7:14 PM, Jiri B <ji...@devio.us> wrote:
>
>> On Wed, Oct 18, 2017 at 06:55:32PM +0530, Ajitabh Pandey wrote:
>> > On Wed, Oct 18, 2017 at 1:43 PM, Jiri B <ji...@devio.us> wrote:
>> >
>> > > On Wed, Oct 18, 2017 at 01:40:06PM +0530, Ajitabh Pandey wrote:
>>
>> See?
>
>
> Yes, I see that. Thank you very much. I will try and figure out on how do
> I make uwsgi create socket with specific ownership and permissions. I would
> hate to chroot the uwsgi because that would mean to copy python libraries
> in /var/www :-)
>
> Thanks again for inputs here.
>

I am now able to create the socket with correct permission / ownership.
Here is the uwsgi ini file -

[uwsgi]
module = wsgi
# process related settings
master = 1
processes = 4
threads = 2

socket = /var/www/run/hello.sock
# approprite ownership and permissions on socket
chmod-socket = 660
chown-socket = www:www

# clear environment on exit
vaccume = true
wsgi-file = myproject.py

and I am running it as -

$ doas uwsgi --ini hellopy.ini --callable app

and this is the permissions now -

$ ls -l /var/www/run
total 0
srw-rw----  1 www  www  0 Oct 18 19:47 hello.sock=

Now when I access

http://192.168.1.111/hello/

request just times out (return code 408)

access.log just shows -

default x.y.a.b - - [18/Oct/2017:19:48:41 +0530]"<UNKNOWN> " 408 0

There is nothing in error.log

Any idea what am I doing wrong.

Regards.
-- 
Ajitabh Pandey
http://ajitabhpandey.info/

Reply via email to