Apache OpenBSD httpd瓶子应用程序和uwsgi

Apache OpenBSD httpd瓶子应用程序和uwsgi,apache,uwsgi,bottle,openbsd,Apache,Uwsgi,Bottle,Openbsd,我想使用本机httpd web服务器在OpenBSD上开发和部署瓶子应用程序。根据我的发现,uWSGI将运行瓶子应用程序,httpd将代理请求。我不知道uWSGI是如何开始的,也不知道如何在OpenBSD上使用ini文件 我可以启动httpd并提供静态内容,我的瓶子应用程序可以很好地与开发web服务器和pythonaywhere配合使用。现在我需要使用httpd和uwsgi运行它。如何启动uwsgi服务器 httpd.conf server "default" { listen

我想使用本机httpd web服务器在OpenBSD上开发和部署瓶子应用程序。根据我的发现,uWSGI将运行瓶子应用程序,httpd将代理请求。我不知道uWSGI是如何开始的,也不知道如何在OpenBSD上使用ini文件

我可以启动httpd并提供静态内容,我的瓶子应用程序可以很好地与开发web服务器和pythonaywhere配合使用。现在我需要使用httpd和uwsgi运行它。如何启动uwsgi服务器

httpd.conf
server "default" {
        listen on egress port 80

        location "/bottleapp/*" {
                fastcgi socket ":3031"
        }
}
types {
        text/css css ;
        text/html htm html ;
        text/txt txt ;
        image/gif gif ;
        image/jpeg jpg jpeg ;
        image/png png ;
        application/javascript js ;
        application/xml xml ;
}

一种方法是创建一个uwsgi rc.d文件,放在/etc/rc.d中。类似以下的方法可能会起作用:

#!/bin/sh

daemon="/path/to/uwsgi"

. /etc/rc.d/rc.subr

rc_reload="NO"

rc_stop() {
        ${daemon} --stop /path/to/uwsgi.pid
}

rc_cmd $1
然后可以运行:rcctl enable uwsgi

和:rcctl set uwsgi flags“-ini/path/to/uwsgi.ini”

具有指向uwsgi ini文件、二进制文件和pid文件的正确路径