discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Aisha Tammy <openbsd@aisha.cc>
To: discuss@mandoc.bsd.lv
Subject: Re: Help with setting up man.cgi with nginx
Date: Thu, 10 Dec 2020 10:26:59 -0500	[thread overview]
Message-ID: <9f89dfc8-70a2-43a8-0cc3-487638c17ea2@aisha.cc> (raw)
In-Reply-To: <20201210150110.GG69368@athene.usta.de>



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


  parent reply	other threads:[~2020-12-10 15:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-10  0:06 Aisha Tammy
2020-12-10 13:46 ` Ingo Schwarze
2020-12-10 14:26   ` Aisha Tammy
2020-12-10 15:01     ` Ingo Schwarze
2020-12-10 15:26       ` Aisha Tammy
2020-12-10 15:26       ` Aisha Tammy [this message]
2020-12-16  3:28       ` Stephen Gregoratto
2020-12-16  4:51         ` Aisha Tammy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9f89dfc8-70a2-43a8-0cc3-487638c17ea2@aisha.cc \
    --to=openbsd@aisha.cc \
    --cc=discuss@mandoc.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).