Skip to content
Snippets Groups Projects
Verified Commit 33ab8eff authored by Karel Koci's avatar Karel Koci :metal: Committed by Josef Schlehofer
Browse files

Revert "Revert "lighttpd: start Foris and reForis FastCGI backends on demand""

This reverts commit 14abc044.

The issue with reforis starting was that both reforis and lighttpd were
creating FCGI socket. Thus lighttpd created socket and send request to
it while reForis replaced that socket when it initialized and thus never
get the initial request. The removal of socket configuration solves the
issue and the patch added here is that fix.
parent 298371cc
No related merge requests found
......@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=reforis
PKG_VERSION:=1.1.1
PKG_RELEASE:=3
PKG_RELEASE:=4
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gitlab.nic.cz/turris/reforis/reforis
......
......@@ -37,6 +37,8 @@ case $SERVER in
echo " \"socket\" => \"/tmp/fastcgi.reforis.socket\","
echo " \"bin-path\" => var.reforis.bin,"
echo ' "check-local" => "disable",'
echo ' "idle-timeout" => 180,'
echo ' "min-procs" => 0,'
echo ' "max-procs" => 1,'
echo ' "bin-environment" => ('
if [ -n "$SENTRY_DSN" ]; then
......
From b039e946ad36c44bb8153a12f3fe60e503d8dedc Mon Sep 17 00:00:00 2001
From: Stepan Henek <stepan.henek@nic.cz>
Date: Wed, 1 Sep 2021 10:07:40 +0200
Subject: [PATCH] Don't set socket when starting WSGIServer
Note that if reforis is started using lighttpd, lighttpd
is responsible for creating the socket not reforis.
Kudos to Glenn Strauss
see https://flask.palletsprojects.com/en/2.0.x/deploying/fastcgi/#configuring-lighttpd
---
reforis/__main__.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/reforis/__main__.py b/reforis/__main__.py
index 2f641055..96767317 100644
--- a/reforis/__main__.py
+++ b/reforis/__main__.py
@@ -1,6 +1,6 @@
#
# reforis
-# Copyright (C) 2019 CZ.NIC, z.s.p.o. (http://www.nic.cz/)
+# Copyright (C) 2021 CZ.NIC, z.s.p.o. (http://www.nic.cz/)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,8 +17,6 @@
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
-import os
-
from flup.server.fcgi import WSGIServer
from . import create_app
@@ -39,7 +37,6 @@ def main():
WSGIServer(
app,
debug=True,
- bindAddress=os.environ.get('FCGI_SOCKET', '/tmp/fastcgi.reforis.socket-0')
).run()
--
2.33.0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment