about summary refs log tree commit homepage
path: root/examples
DateCommit message (Collapse)
2019-04-25examples/cgit-commit-filter.lua: some doc updates
It's been a while since I wrote this, and it needs to be kept up-to-date with some advances in our Perl code.
2019-04-25examples: cgit filter for use with WwwHighlight
I'm using this as the cgit about-filter and source-filter in https://80x24.org/public-inbox.git
2019-04-24examples/cgit-commit-filter: remove unused variable
2019-04-04cgit: support running cgit as a standalone CGI
We depend on git-http-backend for smart HTTP clone support, however; since cgit does not support smart clones natively. WWW.pm will be able to cascade down to this as a 404 handler in the future.
2019-02-07examples/newswww.psgi: demonstrate standalone NewsWWW usage
Plack::Builder allows "mounting" on with hostnames as well as path names to enable virtual hosting. This example demonstrates how port 80/443 for "news.example.com" can redirect browser requests when somebody attempts to use a "nntp://" URL and the software assumes "http://"
2019-01-21highlight: initial wrapper and PSGI service
I'll probably expose the PSGI service for cgit; but it could be useful to others as well.
2019-01-20www: admin-configurable CSS via "publicinbox.css"
Maybe we'll default to a dark theme to promote energy savings... See contrib/css/README for details
2018-12-30examples/cgit-commit-filter.lua: escape '&' properly in URL
2018-12-29examples/cgit-commit-filter.lua: update URLs
Let's Encrypt is working out nicely, so we can rely on HTTPS, now. Use 80x24.org instead of bogomips.org while we're at it, since I don't think the latter will remain.
2018-05-30examples: add systemd example for public-inbox-watch
I guess I forgot to include this, but I've been running public-inbox-watch as a systemd service for nearly two years, now.
2018-02-07update copyrights for 2018
Using update-copyrights from gnulib While we're at it, use the SPDX identifier for AGPL-3.0+ to ease mechanical processing.
2016-12-25githttpbackend: simplify compatibility code
Fewer conditionals means theres fewer code paths to test and makes things easier-to-read.
2016-07-08examples: add logrotate sample to show USR1 reopening
Same as nginx :>
2016-07-08examples: minimize differences for systemd examples
Our nntpd and httpd are similar so configuration differences should be minimized
2016-07-03examples/varnish-4.vcl: comments and tweaks
Document and simplify things a bit. The major functional change is we no longer waste space caching objects from dumb HTTP clones.
2016-07-03examples: remove X-Forwarded-For mentions
We don't need to care about client IPs anywhere.
2016-07-01examples: add varnish-4.vcl
Well, I'm fumbling along with this config. Might as well fumble along with it publically :)
2016-07-01examples/README: update URL to point to our HTTPS backend
It's browseable, too!
2016-07-01git: allow cloning from the URL root, too
This means we can still show non-git users a somewhat browseable URL with a link to the README.html file while allowing git users to type less when cloning. All of the following are supported: git clone https://public-inbox.org/ public-inbox git clone https://public-inbox.org/public-inbox git clone https://public-inbox.org/public-inbox.git torsocks git clone http://ou63pmih66umazou.onion/public-inbox
2016-07-01update git repo location to https:// using GitHTTPBackend.pm
Might as well eat our own dogfood...
2016-06-19examples/*@.service: wait one day for graceful shutdown
Because sometimes folks will want to download gigantic mboxes or make large clones over Tor which are not resume-friendly. Note: the timeout logic in nntpd is somewhat over-aggressive and can break some large slrnpulls. This ought to be easily recoverable on the client-side, though, since it's based on per-message fetches.
2016-06-13doc: systemd examples should only kill one process
For our daemons, killing only the master process is enough. Killing the entire control group (as done by default in systemd) may cause subprocesses such as git to shut down unexpectedly. Having systemd kill workers directly will also cause an immediate shutdown since the master would've already signaled the workers; and workers will die after two shutdown requests.
2016-06-13examples: systemd socket and service definitions for daemons
Since our daemons are built to take advantage of socket activation, provide example files to allow systems administrators to hit the ground running with systemd. Example init files for other systems greatly appreciated.
2016-06-07unsubscribe.psgi: disable confirmation
This makes unsubscribing easier and frictionless.
2016-06-07unsubscribe.milter: implement archive blacklist
We don't want people following links from archivers and breaking archival.
2016-06-07Merge branch 'unsubscribe'
* unsubscribe: unsubscribe.milter: use default postfork dispatcher unsubscribe: prevent decrypt from showing random crap examples/unsubscribe-psgi@.service: disable worker processes unsubscribe: bad URL fixup unsubscribe: get off mah lawn^H^H^Hist
2016-05-28examples: config no longer supports atomUrl
We build the atomUrl from url, which can change dynamically depending on what PSGI environment it is called under.
2016-05-27unsubscribe.milter: use default postfork dispatcher
Let postfix (or sendmail :P) control the concurrency limit instead of doing it ourselves. This is necessary because SMTP connections are completely synchronous at this point and a slow/idle SMTP connection will monopolize the worker process.
2016-05-23http: chunk in the server, not middleware
Since PSGI does not require Transfer-Encoding: chunked or Content-Length, we cannot expect random apps we host to chunk their responses. Thus, to improve interoperability, chunk at the HTTP layer like other PSGI servers do. I'm chosing a more syscall-intensive method (via multiple send(...MSG_MORE) for now to reduce copy + packet overhead.
2016-05-21examples/unsubscribe-psgi@.service: disable worker processes
This unsubscribe PSGI endpoint should never incur enough load to justify using multiple worker processes. If it's unstable and crashes, systemd can automatically restart it.
2016-05-20unsubscribe: get off mah lawn^H^H^Hist
While public-inbox is intended primarily for archival, SMTP list subscriptions are still in use in most places and users are likely to want a good unsubscribe mechanism. HTTP (or HTTPS) links in the List-Unsubscribe header are often preferable since some users may use an incorrect email address for mailto: links. Thus, it is useful to provide an example which generates an HTTPS link for users to click on. The default .psgi requires a POST confirmation (as destructive actions with GET are considered bad practice). However, the "confirm" parameter may be disabled for a true "one-click" unsubscribe. The generated URLs are hopefully short enough and both shell and highlighting-friendly to reduce copy+paste errors.
2016-04-06examples/public-inbox.psgi: add note for our httpd
Default to maximizing compatibility in the example, but document the potential improvement if possible. Of course, using public-inbox-httpd out-of-the-box without a user-specified config file already enables chunked encoding by default.
2016-03-12examples: disable Chunked response in PSGI example
It seems incompatible with Starman and probably confuses other HTTP/1.0-only servers, too. Our -httpd will respect it and requires it for persistent connections.
2016-02-29fixup Plack-related requires
We do not need to load Plack::Request outside of WWW anymore.
2016-02-28examples/public-inbox.psgi: relax license to GPL-3.0+
Using the AGPL for server config files is probably overkill. GPL-3.0+ still requires appliance vendors to disclose configurations which seems desirable for end users.
2016-02-28examples: various Apache-related doc updates
Plack::Handler::Apache2 exists and seems to work very well.
2016-02-28examples/cgi-webrick.rb: set CGIPathEnv, update comments
webrick clears PATH otherwise, and we rely on git commands.
2016-02-28examples/: PSGI example updates
Users wanting to customize their installation should know to about the usability of STDOUT for logging. (and we still need manpages for -nntpd and -httpd)
2016-02-28httpd: allow running if ReverseProxy is missing
Not everybody will be running this behind a ReverseProxy; but it's probably the likely configuration. Anyways, warn about this and also about Deflater being missing.
2016-02-26psgi: enable ReverseProxy middleware by default
ReverseProxy is the common way to run Perl applications, so enable it by default and don't care too much about fake requests because we don't handle any sensitive information or rely on authentication (everything is read-only from the WWW interface and will remain so).
2016-02-25www: make interface more OO
This allows multiple instances the WWW app from running within the same process space
2016-02-13examples/public-inbox.psgi: document ReverseProxy
Running behind a ReverseProxy is a popular deployment, so document it for users.
2016-01-03examples/public-inbox.psgi: shorten to simplify
Enable deflater using a shorter string as we do with other middlewares, and use single quotes to denote we do not need interpolation.
2015-12-25examples/public-inbox.psgi: make output chunky by default
HTTP/1.1 clients will want persistent connections and need to know response terminations.
2015-09-15add cgit commit-filter example
public-inbox has search functionality, so take advantage of good commit messages with proper titles to lookup discussion.
2015-09-11examples/public-inbox.psgi: optional deflater
The deflater middleware isn't standard Plack, so don't require potential users install it.
2015-09-06update copyright headers and email addresses
In the future, it should be possible to use this: git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \ UPDATE_COPYRIGHT_USE_INTERVALS=2 \ xargs /path/to/gnulib/build-aux/update-copyright
2015-09-03examples/public-inbox.psgi: update with middlewares
HTML, text, and probably Atom feeds should be compressed.
2014-10-26examples/public-inbox.psgi: add usage to comments
I often forget how to run this
2014-05-05examples/apache2_perl.conf: set PI_CONFIG
This is easier and lower-impact than setting HOME anywhere.