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, HTML_MESSAGE,NICE_REPLY_A,T_TVD_MIME_EPI autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 23177 invoked from network); 10 Dec 2020 14:26:46 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with ESMTPUTF8; 10 Dec 2020 14:26:46 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 522e7e5c for ; Thu, 10 Dec 2020 09:26:43 -0500 (EST) Received: from mail.aisha.cc (mail.aisha.cc [108.61.81.40]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id ca953ca8 for ; Thu, 10 Dec 2020 09:26:42 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aisha.cc; s=excisionRSA; t=1607610400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0cfZ5odrxAFK1+FaaGcwe4ySfLoWoxjgOCV+8gQcP04=; b=kkOcIohdVmr+WRwbt7mKHkUOaNmRWdDkI4p3PyagbWmibkUroFN976ZSdYQD5TbYsf/sYy zRbvmZFHKrJ7re38BX2MvV3YssRR9KaOGgGvtoQGmmezBiZ9OK1L9U3CKsYYFveIjOzTFL A4nVsoDkwCUU54ygdzJLr3Bqcxn/xJrJvZT9nY7HJpA6IXNCnivVRoKxtjrOm4Exh1bTrO 9a8VQ5irTnH7n9Nj/FMlw1f+5WJQg9EbiELicxzNpM9n1dGVz2Bh/BdtN5q/h11jYoTKv7 i8h+VexBKrXBfLjF+kJ6KR0cZIuRHcNmYvbGKcjLTI7e3hQAd8KvSyVg8ge8hw== 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 215e909a (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) auth=yes user=aisha@aisha.cc for ; Thu, 10 Dec 2020 09:26:39 -0500 (EST) To: discuss@mandoc.bsd.lv References: <00b30a32-e90b-7f72-3120-63e0d38fe36a@aisha.cc> <20201210134616.GF69368@athene.usta.de> From: Aisha Tammy Organization: aisha.cc Subject: Re: Help with setting up man.cgi with nginx Message-ID: <97060694-da6a-0717-7790-8e474c66b48f@aisha.cc> Date: Thu, 10 Dec 2020 09:26:36 -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: <20201210134616.GF69368@athene.usta.de> Content-Type: multipart/alternative; boundary="------------3DF668FBDE04653030B86E2E" Content-Language: en-US This is a multi-part message in MIME format. --------------3DF668FBDE04653030B86E2E Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 thingie= s 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; } } } --------------3DF668FBDE04653030B86E2E Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit 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;
		}
	}
}
--------------3DF668FBDE04653030B86E2E-- -- To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv