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 09:26:36 -0500	[thread overview]
Message-ID: <97060694-da6a-0717-7790-8e474c66b48f@aisha.cc> (raw)
In-Reply-To: <20201210134616.GF69368@athene.usta.de>

[-- Attachment #1: Type: text/plain, Size: 1728 bytes --]

I finally got it working *cries in lost sanity*...

Turns out I (or nginx or whatever) was not passing the PATH_INFO fastcgi parameter.
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. 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 and that this is an OS thing and not an application thing -.- , so that was fun.

Aisha

user nginx nginx;
worker_processes 1;

error_log /var/log/nginx/error_log info;

events {
	worker_connections 1024;
	use epoll;
}

http {
	include /etc/nginx/mime.types;
	default_type application/octet-stream;

	log_format main
		'$remote_addr - $remote_user [$time_local] '
		'"$request" $status $bytes_sent '
		'"$http_referer" "$http_user_agent" '
		'"$gzip_ratio"';

	client_header_timeout 10m;
	client_body_timeout 10m;
	send_timeout 10m;

	connection_pool_size 256;
	client_header_buffer_size 1k;
	large_client_header_buffers 4 2k;
	request_pool_size 4k;

	gzip off;

	output_buffers 1 32k;
	postpone_output 1460;

	sendfile on;
	tcp_nopush on;
	tcp_nodelay on;

	keepalive_timeout 75 20;

	ignore_invalid_headers on;

        server {
		server_name localhost;
		listen 0.0.0.0;
		listen [::];

		location ~ / {
			fastcgi_split_path_info ^(/cgi\-bin/man\.cgi/)(.+)$;
			include fastcgi_params;
			fastcgi_pass 127.0.0.1:12345;
			fastcgi_param SCRIPT_FILENAME /var/www/cgi-bin/man.cgi;
			fastcgi_param PATH_INFO $fastcgi_path_info;
		}
	}
}


[-- Attachment #2: Type: text/html, Size: 1929 bytes --]

  reply	other threads:[~2020-12-10 14:26 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 [this message]
2020-12-10 15:01     ` Ingo Schwarze
2020-12-10 15:26       ` Aisha Tammy
2020-12-10 15:26       ` Aisha Tammy
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=97060694-da6a-0717-7790-8e474c66b48f@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).