What are the permissions on the socket? Can user www read and write to it?
On Aug 12, 2018 11:40 AM, Tony Boston <tb@bsd.services> wrote:
>
> On 12.08.18 03:25, flipchan wrote:
> > Hello all,
> >
> > im trying to run a python flask application with httpd
> > as a reverse proxy and im not getting it to work.
> >
> > According to the python flask's online documentation,
> > i should be able to just create a fast-cgi socket that
> > should work with httpd, however i am only getting 500
> > errors when i do this.
> > Link: https://uwsgi-docs.readthedocs.io/en/latest/OpenBSDhttpd.html
> >
> >
> >
> > curl output:
> > * About to connect() to mywebsite.com port 8086 (#0)
> > * Trying myip...
> > * connected
> > * Connected to mywebsite.com (myip) port 8086 (#0)
> > > GET /test HTTP/1.1
> > > User-Agent: curl/7.26.0
> > > Host: mywebsite.com:8086
> > > Accept: */*
> > >
> > * additional stuff not fine transfer.c:1037: 0 0
> > * HTTP 1.0, assume close after body
> > < HTTP/1.0 500 Internal Server Error
> > < Date: Tue, 15 May 2018 15:40:40 GMT
> > < Server: OpenBSD httpd
> > < Connection: close
> > < Content-Type: text/html
> > < Content-Length: 451
> > <
> > <!DOCTYPE html>
> > <html>
> > <head>
> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
> > <title>500 Internal Server Error</title>
> > <style type="text/css"><!--
> > body { background-color: white; color: black; font-family: 'Comic Sans MS',
> > 'Chalkboard SE', 'Comic Neue', sans-serif; }
> > hr { border: 0; border-bottom: 1px dashed; }
> >
> > --></style>
> > </head>
> > <body>
> > <h1>500 Internal Server Error</h1>
> > <hr>
> > <address>OpenBSD httpd</address>
> > </body>
> > </html>
> > * Closing connection #0
> >
> > # cat /etc/httpd.conf
> > # $OpenBSD: httpd.conf,v 1.16 2016/09/17 20:05:59 tj Exp $
> >
> > # A minimal default server
> > server "default" {
> > listen on 0.0.0.0 port 8086
> >
> > fastcgi socket "/var/www/run/pfweb.sock"
> > }
> >
> >
> >
> >
> > i also tried to have the python script manually create a
> > fast-cgi socket with the python library flup
> > ("https://pypi.python.org/pypi/flup/1.0.2")
> >
> >
> >
> > Have anyone gotten a python flask application to work with httpd
> > as a reverse proxy with a fast-cgi socket? cuz im really not
> > getting it to work.
> >
> >
> >
> > Thanks in advanced
> > -flipchan
> >
> > --
> > Take Care Sincerely flipchan layerprox dev
>
> Since you're getting Error 500 - you should look at your webserver
> logs - I don't see any in your email
>
> --
> Tony
>
> GPG-FP: 913BBD25 8DA503C7 BAE0C0B6 8995E906 4FBAD580
> Threema: DN8PJX4Z