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=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id E3B1F1F9FD; Wed, 24 Feb 2021 11:09:46 +0000 (UTC) Date: Wed, 24 Feb 2021 11:09:46 +0000 From: Eric Wong To: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= Cc: meta@public-inbox.org Subject: Re: Setup woes Message-ID: <20210224110946.GB30232@dcvr> References: <20210223154246.uso4tc2qf5bz6qym@pengutronix.de> <20210223200124.GA26348@dcvr> <20210223213117.52p5kmhqvtafbho5@pengutronix.de> <20210223221110.GA2920@dcvr> <20210224102513.wupzbvojl7g4kr5k@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210224102513.wupzbvojl7g4kr5k@pengutronix.de> List-Id: Uwe Kleine-König wrote: > Hello Eric, > > On Tue, Feb 23, 2021 at 10:11:10PM +0000, Eric Wong wrote: > > Uwe Kleine-König wrote: > > > On Tue, Feb 23, 2021 at 08:01:24PM +0000, Eric Wong wrote: > > > > > The Apache config looks as follows: > > > > > > > > > > > > > > > ServerName lore.pengutronix.de > > > > > > > > > > ServerAdmin webmaster@localhost > > > > > DocumentRoot /srv/www/lore.pengutronix.de/root > > > > > > > > > > > > > > > AllowOverride None > > > > > Require all granted > > > > > > > > > > > > > > > LogLevel debug > > > > > > > > > > ErrorLog ${APACHE_LOG_DIR}/error.log > > > > > CustomLog ${APACHE_LOG_DIR}/access.log combined > > > > > > > > > > Include conf-available/serve-cgi-bin.conf > > > > > Include mods-available/rewrite.load > > > > > SetEnv PI_DIR /home/lore/.public-inbox > > > > > SetEnv NO_SCRIPT_NAME 1 > > > > > > > > > > Options +ExecCGI > > > > > ScriptAlias /public-inbox.cgi "/usr/lib/cgi-bin/public-inbox.cgi" > > > > > > > > > > DirectoryIndex public-inbox.cgi > > > > > RewriteEngine On > > > > > RewriteCond %{REQUEST_FILENAME} !-f > > > > > RewriteCond %{REQUEST_FILENAME} !-d > > > > > > > > Perhaps it's the -d check? I haven't tested WwwListing with > > > > Apache. > > I scraped the whole rewriting now and use: > > ScriptAlias / "/usr/lib/cgi-bin/public-inbox.cgi/" > > which gets rid of the added script name. So all my problems are fixed > now. Good to know and thanks for the data point. > However this removes the freedom to put stuff into the document root > that is then served at the matching location. Does that make this > solution unsuitable for the documentation? Yes, it's probably unsuitable... There really ought to be a way to fallback to static content. The static fallback is important if caching solutions (e.g. varnish) aren't available. Also, the WwwListing didn't exist initially since I figured webmasters might want a custom index.html anyways. Most of the endpoints end with "/" (e.g. /T/ or /t/), so they're even easy-to-mirror/fallback with only static webserver functions. An admin running without varnish can quickly put up an index.html for any msgid and serve the static content if a /$MSGID/, /$MSGID/t/, /$MSGID/T/, /$MSGID/t.mbox.gz endpoint gets overloaded. They could even script something to auto-refresh those static endpoints periodically (but I guess it's much easier to just run varnish :>) There might also be other stuff (robots.txt, .well-known/)