unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: meta@public-inbox.org
Subject: Re: Setup woes
Date: Wed, 24 Feb 2021 11:09:46 +0000	[thread overview]
Message-ID: <20210224110946.GB30232@dcvr> (raw)
In-Reply-To: <20210224102513.wupzbvojl7g4kr5k@pengutronix.de>

Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> Hello Eric,
> 
> On Tue, Feb 23, 2021 at 10:11:10PM +0000, Eric Wong wrote:
> > Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> > > On Tue, Feb 23, 2021 at 08:01:24PM +0000, Eric Wong wrote:
> > > > >     The Apache config looks as follows:
> > > > > 
> > > > > 	<VirtualHost *:80>
> > > > > 		ServerName lore.pengutronix.de
> > > > > 
> > > > > 		ServerAdmin webmaster@localhost
> > > > > 		DocumentRoot /srv/www/lore.pengutronix.de/root
> > > > > 
> > > > > 		<Directory "/srv/www/lore.pengutronix.de/root">
> > > > > 			AllowOverride None
> > > > > 			Require all granted
> > > > > 		</Directory>
> > > > > 
> > > > > 		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/)

      reply	other threads:[~2021-02-24 11:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-23 15:42 Setup woes Uwe Kleine-König
2021-02-23 20:01 ` Eric Wong
2021-02-23 21:31   ` Uwe Kleine-König
2021-02-23 22:11     ` Eric Wong
2021-02-24 10:25       ` Uwe Kleine-König
2021-02-24 11:09         ` Eric Wong [this message]

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

  List information: https://public-inbox.org/README

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

  git send-email \
    --in-reply-to=20210224110946.GB30232@dcvr \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).