From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.4 required=3.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 90B521F9FD for ; Tue, 23 Feb 2021 21:31:20 +0000 (UTC) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lEfH5-0002BH-6p; Tue, 23 Feb 2021 22:31:19 +0100 Received: from ukl by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lEfH3-0000tB-UE; Tue, 23 Feb 2021 22:31:17 +0100 Date: Tue, 23 Feb 2021 22:31:17 +0100 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Eric Wong Cc: meta@public-inbox.org Subject: Re: Setup woes Message-ID: <20210223213117.52p5kmhqvtafbho5@pengutronix.de> References: <20210223154246.uso4tc2qf5bz6qym@pengutronix.de> <20210223200124.GA26348@dcvr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="dgay2fyfsvpyqby2" Content-Disposition: inline In-Reply-To: <20210223200124.GA26348@dcvr> X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: meta@public-inbox.org List-Id: --dgay2fyfsvpyqby2 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Eric, On Tue, Feb 23, 2021 at 08:01:24PM +0000, Eric Wong wrote: > Uwe Kleine-K=F6nig wrote: > > 1) Import of older mails > > I used Konstantin Ryabitsev script[1] to generate a directory of > > mbob files. It's unclear to me how to easily import that into the > > archive. Not knowing a better way, I'd put them all in a Maildir and > > use public-inbox-watch to import them. Is there a nicer way? >=20 > scripts/import_vger_from_mbox is probably the best maintained > of the stuff in scripts for mass imports (it supports v2, unlike > the rest of scripts/). Ah, this worked great. I missed these scripts because they are not included in my public-inbox.deb. > > 2) Apache configuration > > I was able to setup Apache to serve individual archives but I fail > > to get a list listing at the root. That is I can access the barebox > > archive at http://lore.pengutronix.de/barebox/, but not the overview > > of the archived lists at http://lore.pengutronix.de/. > >=20 > > $ curl -D - http://lore.pengutronix.de/ > > HTTP/1.1 404 Not Found > > Date: Tue, 23 Feb 2021 15:31:54 GMT > > Server: Apache/2.4.38 (Debian) > > Expires: Fri, 01 Jan 1980 00:00:00 GMT > > Pragma: no-cache > > Cache-Control: no-cache, max-age=3D0, must-revalidate > > Content-Length: 9 > > Content-Type: text/plain > >=20 > > Not Found >=20 > You might need to configure publicinbox.wwwlisting to > "all" or match=3Ddomain". See publicinbox.wwwlisting in > public-inbox-config(5). I have this, with public-inbox-httpd I get a listing. > The default behavior is to 404 since the listing is a > fairly recent addition. >=20 > > The Apache config looks as follows: > >=20 > > > > ServerName lore.pengutronix.de > >=20 > > ServerAdmin webmaster@localhost > > DocumentRoot /srv/www/lore.pengutronix.de/root > >=20 > > > > AllowOverride None > > Require all granted > > > >=20 > > LogLevel debug > >=20 > > ErrorLog ${APACHE_LOG_DIR}/error.log > > CustomLog ${APACHE_LOG_DIR}/access.log combined > >=20 > > Include conf-available/serve-cgi-bin.conf > > Include mods-available/rewrite.load > > SetEnv PI_DIR /home/lore/.public-inbox > > SetEnv NO_SCRIPT_NAME 1 > >=20 > > Options +ExecCGI > > ScriptAlias /public-inbox.cgi "/usr/lib/cgi-bin/public-inbox.cgi" > >=20 > > DirectoryIndex public-inbox.cgi > > RewriteEngine On > > RewriteCond %{REQUEST_FILENAME} !-f > > RewriteCond %{REQUEST_FILENAME} !-d >=20 > Perhaps it's the -d check? I haven't tested WwwListing with > Apache. When I drop this I get: $ curl http://lore.pengutronix.de/ 500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.


Apache/2.4.38 (Debian) Server at lore.pengutronix.de Port 80 :-) =20 > > RewriteRule ^.* /public-inbox.cgi/$0 [L,PT] > >=20 > > > >=20 > > My guess is that the "SetEnv NO_SCRIPT_NAME 1" part doesn't work as > > expected, but after some searching in the net I didn't find how to > > do this properly. >=20 > Not sure, I haven't used Apache in ages and some of the configs > in examples/ are likely out-of-date and never tested with > WwwListing. >=20 > If you're not using public-inbox-httpd; then I strongly suggest > using at least mod_perl (and not plain CGI) since Perl startup > time is atrocious. I used CGI because I had the impression this was the easiest to get running. Also ISTR that this isn't using cgi, but cgid, so the startup time isn't that relevant. Will try with mod_perl next, maybe the script name issue will go away then. When I debugged that some time ago I saw that /public-inbox.cgi/ is part of the request URL that is handled in the CGI. Also the footer of the generated pages has: This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.pengutronix.de/public-inbox.cgi/barebox/0 b= arebox/git/0.git ... which is wrong. =20 > If you're dealing with large inboxes and supporting smart HTTP > clone/fetch, then use public-inbox-httpd (which works with > varnish, mod_proxy, or any other front-end proxy). Using Apache was one of the preconditions by the company's admin team, but I will forward your information once I'm done with the setup and when I hand over operation of lore.pengutronix.de to them. > public-inbox-httpd can throttle CPU/memory intensive tasks > (e.g. git-http-backend, cgit) independently of other work > (the "limiter" stuff in public-inbox-config(5)). >=20 > As of public-inbox 1.6, -httpd also does git blob retrievals > around 20% faster on /T/, /t/ and t.mbox.gz requests and > decouples high-latency HDD from network ops. Thanks for your valuable input, Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --dgay2fyfsvpyqby2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAmA1dCIACgkQwfwUeK3K 7AluZwgAmWxoxmQ2v5k1zFq1CtMwUKA/ITRpnm8fOQpxsvxQqANMRcbzG1u5uzNp RgQb8zu0wstQH1i7N4OQ9vX0X6jri8dmweknZgzfniXDjPdmJDfMSvBqH2X+wg+/ /frwmZzHCkXzIx//ttAzpDglr/85pja+BFy0buLapLqQ+3nY9ikrNbEALidRO3PE +6LTFfl8vzSiZtovv4+tf+aOUIU9paMvmjAeq12qu+ewYXCjZ9Fo045AHui+gwb/ v6Bdjw1X3+7BJbApuqoGaUT7zBPJGaG9Az4zlTi+NyhvZHnHN9K5HUtzwf+L1NJ6 r+RtwSpHdEOZs9gxNzM5B0dlXw2rXQ== =6w/x -----END PGP SIGNATURE----- --dgay2fyfsvpyqby2--