Re: Flask app as UWSGI returning 500 when accessed through OpenBSD HTTPD

2017-10-19 Thread Kamil CholewiƄski
I Am Not A uWSGI Expert, but the way we've been usually setting it up is via plain HTTP reverse proxying, never CGI/FastCGI. I would try that approach first.

Re: Flask app as UWSGI returning 500 when accessed through OpenBSD HTTPD

2017-10-18 Thread Ajitabh Pandey
On Wed, Oct 18, 2017 at 7:25 PM, Ajitabh Pandey wrote: > > On Wed, Oct 18, 2017 at 7:14 PM, Jiri B 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 wrote: >> > >> > > On Wed, Oct 18, 2017 at 01:40:06PM +0530, Ajitabh Pandey

Re: Flask app as UWSGI returning 500 when accessed through OpenBSD HTTPD

2017-10-18 Thread Ajitabh Pandey
On Wed, Oct 18, 2017 at 7:14 PM, Jiri B 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 wrote: > > > > > On Wed, Oct 18, 2017 at 01:40:06PM +0530, Ajitabh Pandey wrote: > > > > > > Can httpd access the socket? What are permissi

Re: Flask app as UWSGI returning 500 when accessed through OpenBSD HTTPD

2017-10-18 Thread Jiri B
On Wed, Oct 18, 2017 at 06:55:32PM +0530, Ajitabh Pandey wrote: > On Wed, Oct 18, 2017 at 1:43 PM, Jiri B wrote: > > > On Wed, Oct 18, 2017 at 01:40:06PM +0530, Ajitabh Pandey wrote: > > > > Can httpd access the socket? What are permissions? > > > > j. > > > > Here are the perms - > > srwxr-xr-

Re: Flask app as UWSGI returning 500 when accessed through OpenBSD HTTPD

2017-10-18 Thread Ajitabh Pandey
On Wed, Oct 18, 2017 at 1:43 PM, Jiri B wrote: > On Wed, Oct 18, 2017 at 01:40:06PM +0530, Ajitabh Pandey wrote: > > Can httpd access the socket? What are permissions? > > j. > Here are the perms - srwxr-xr-x 1 root daemon 0 Oct 18 13:35 hello.sock -- Ajitabh Pandey http://ajitabhpandey.in

Re: Flask app as UWSGI returning 500 when accessed through OpenBSD HTTPD

2017-10-18 Thread Ajitabh Pandey
On Wed, 18 Oct 2017 at 4:45 PM, Gregory Edigarov wrote: > > > > I get 500 > > > hi, what's in your error.log? Nothing is in the error log. The access log indicates one line with 500 in it.

Re: Flask app as UWSGI returning 500 when accessed through OpenBSD HTTPD

2017-10-18 Thread Gregory Edigarov
On 18.10.17 10:36, Ajitabh Pandey wrote: $ uwsgi --http : --wsgi-file myproject.py --master --callable app $ curl http://127.0.0.1:/ returns the contents, but when I access the page as http://192.168.1.111/hello/ I get 500. Any pointers will be helpful. hi, what's in your error.log

Re: Flask app as UWSGI returning 500 when accessed through OpenBSD HTTPD

2017-10-18 Thread Jiri B
On Wed, Oct 18, 2017 at 01:40:06PM +0530, Ajitabh Pandey wrote: > Thanks for the quick response. I tried that, still getting 500 the same > problem - > > $ doas uwsgi --socket /var/www/run/hello.sock --wsgi-file myproject.py > --master --callable app > > In /etc/httpd.conf - > > location "/hel

Re: Flask app as UWSGI returning 500 when accessed through OpenBSD HTTPD

2017-10-18 Thread Ajitabh Pandey
Thanks for the quick response. I tried that, still getting 500 the same problem - $ doas uwsgi --socket /var/www/run/hello.sock --wsgi-file myproject.py --master --callable app In /etc/httpd.conf - location "/hello/*" { fastcgi socket "/run/hello.sock" } Regards. -- Ajitabh Pandey On

Flask app as UWSGI returning 500 when accessed through OpenBSD HTTPD

2017-10-18 Thread Ajitabh Pandey
Hi, I am trying to setup a sample flask application proxy through OpenBSD httpd. Here is the config - -- ext_ip="192.168.1.111" prefork 2 server "default" { listen on $ext_ip port 80 root "/htdocs" location "/hello/*" { fastcgi socket "