From owner-freebsd-questions@FreeBSD.ORG Sat May 30 20:38:03 2015 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 201FBD64; Sat, 30 May 2015 20:38:03 +0000 (UTC) (envelope-from che@bein.link) Received: from mail.bein.link (bein.link [37.252.124.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DADEA1FC0; Sat, 30 May 2015 20:38:02 +0000 (UTC) (envelope-from che@bein.link) Received: from thinkpad.localnet (home.bein.link [188.134.8.193]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bein.link (Postfix) with ESMTPSA id 086CE1AF1B4; Sat, 30 May 2015 20:37:57 +0000 (UTC) From: Maxim V Filimonov To: freebsd-questions@freebsd.org Reply-To: che@bein.link Cc: Rod Person , "questions@freebsd.org" Subject: Re: nginx and simple python cgi Date: Sat, 30 May 2015 23:37:57 +0300 Message-ID: <4925872.2k2hQimyEc@thinkpad> User-Agent: KMail/4.14.3 (FreeBSD/10.1-RELEASE-p10; KDE/4.14.3; amd64; ; ) In-Reply-To: <20150530160412.480305cd@atomizer> References: <20150530160412.480305cd@atomizer> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 May 2015 20:38:03 -0000 On Saturday 30 May 2015 16:04:12 Rod Person wrote: > Does anyone know how to or can point me to a how to on setting up > nginx to use python for cgi? > > I have setup to use django and php, but simple python scripts such as > the one below don't work. uwsgi seems to want full blown application, > if not I can't find any guide anywhere that uses it without django or > flask, etc. > > > #!/usr/bin/env python > > print "Content-type: text/html\r\n\r\n"; > print "Hi
"; Have you tried FastCGI? https://nginx.localdomain.pl/wiki/FcgiWrap -- wbr, Maxim Filimonov