From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, NICE_REPLY_A autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 30093 invoked from network); 10 Dec 2020 15:27:03 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with ESMTPUTF8; 10 Dec 2020 15:27:03 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id b8d46d12 for ; Thu, 10 Dec 2020 10:27:02 -0500 (EST) Received: from mail.aisha.cc (mail.aisha.cc [108.61.81.40]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id d2fe4476 for ; Thu, 10 Dec 2020 10:27:01 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aisha.cc; s=excisionRSA; t=1607614020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nm2/3T2RDDXMO1ZkWLdSuwR9ClWs0M6/NTLpI16/rgs=; b=CZViuKY+8e0m8OMfHMM5aKb4XiXPI9sAuZOs/m6z9l5Zpjp5izTfaNsUtOXl9zoeZhv7Q9 VKJ1a6MTPekVDcLjP1Xg1vFDiX40/VOVkBxt6ojIt1zFa2WUDF71/Vw3nYxdlk4JEuXBHk BgutJ3znMNVsqhDGklpKfwnHLDD2rdTyWQVPbfinBSwrB1EHjmp52NYwNO6O4Ll1BLO6a6 KEa9ez3pvvvkm5aWBMv1ZGfOP4vjpTQ4HoA+kEFg2H3mcjJCP69r/oeSmrOoEgEUCnah+j V/7KBdzrfHkB1T0KSpYbKzPSYcDtw2CPpoilhUMly2wjXL39j3c5lwbWnB3WzQ== Received: from [192.168.1.129] (c-73-215-141-174.hsd1.nj.comcast.net [73.215.141.174]) by mail.aisha.cc (OpenSMTPD) with ESMTPSA id 1b362de5 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) auth=yes user=aisha@aisha.cc for ; Thu, 10 Dec 2020 10:27:00 -0500 (EST) To: discuss@mandoc.bsd.lv References: <00b30a32-e90b-7f72-3120-63e0d38fe36a@aisha.cc> <20201210134616.GF69368@athene.usta.de> <97060694-da6a-0717-7790-8e474c66b48f@aisha.cc> <20201210150110.GG69368@athene.usta.de> From: Aisha Tammy Organization: aisha.cc Subject: Re: Help with setting up man.cgi with nginx Message-ID: <9f89dfc8-70a2-43a8-0cc3-487638c17ea2@aisha.cc> Date: Thu, 10 Dec 2020 10:26:59 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 X-Mailinglist: mandoc-discuss Reply-To: discuss@mandoc.bsd.lv MIME-Version: 1.0 In-Reply-To: <20201210150110.GG69368@athene.usta.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit On 12/10/20 10:01 AM, Ingo Schwarze wrote: > Hi Aisha, > > Aisha Tammy wrote on Thu, Dec 10, 2020 at 09:26:36AM -0500: > >> I finally got it working *cries in lost sanity*... >> >> Turns out I (or nginx or whatever) was not passing the PATH_INFO >> fastcgi parameter. > > Oh, that does indeed explain why you always got the start page and > the two links on the start page only brought you back to the start > page. > > So, are you saying that with your new configuration, > > http://localhost/ls.1 > > and the like now work as expected? > > If so, does > > http://localhost/?query=ls > > work, too? If not, i suspect you may need to pass QUERY_STRING > in the same way as you pass PATH_INFO, see > > https://man.openbsd.org/man.cgi.8#ENVIRONMENT > > for details. If it already works right now, then maybe nginx passes > QUERY_STRING by default - though i don't quite see why it would > pass QUERY_STRING by default but not PATH_INFO. That would feel > like an odd choice of defaults to me. The default 'fastcgi_params' file, used in 'include fastcgi_params;' contains QUERY_STRING but no PATH_INFO :-\ ... Which explains this behaviour (indeed odd choice of defaults). > >> Obscure chases through the internet led me to the final nginx.conf >> configuration which finally made it work... >> Please don't ask me on how this works, it's dangerous forbidden dark arts >> of nginx magic. > > Don't worry, i won't ask. :-) > > (But do consider that running a webserver on the Internet with a > configuration you don't understand is seriously dangerous. > So you should ask yourself how your server works, until you > understand it, or use something else that you do understand.) > Ah, now worries on that front, this is for my local benefit. I don't like spending all my time in the terminal :) >> This was my first ever use of nginx, all my other thingies >> are on obsd httpd. >> >> Now to see how to work a chroot with nginx and fcgiwrap. >> #nginx irc users told me that this is stupid > > What is stupid? Running man.cgi(8) at all? Or running it on Linux? > or running it on nginx? Or ...? That having nginx do chroot is stupid... Apparently it should be done by the sysadmin, before running nginx. > >> and that this is an OS thing and not an application thing -.- > > Which aspect of all this is an OS thing, and what does "an application > thing" mean? I don't think i understand what you are tryong to say > with this sentence. As above, in their opinion chroot should be an os thing, it is not supposed to be done by nginx, which sounds very weird considering that (i think) openbsd had patched nginx (at some point in history) to support chroot. Not to mention that lighttpd, httpd, uwsgi (and a lot of other web service things) support changing chroot.... Well, user opinions on IRC are not to be counted, no matter how popularly held that belief is. So my current plan is to shift to lighttpd + uwsgi (for fcgiwrap), as both support chroot options (maybe useful for others who read this thread in the future). Cheers, Aisha > >> , so that was fun. > > In that case, enjoy! ;-/ > Ingo > -- > To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv > -- To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv