From 40f904af79fbcb80b062acf7c6cfc5242c7c1ba5 Mon Sep 17 00:00:00 2001 From: anarcat Date: Tue, 23 Oct 2018 12:35:15 -0400 Subject: [PATCH] add sample Apache configuration (#374) * add sample Apache configuration This configuration can be used when launching `wayback` in the default configuration, which is useful to add stuff like access control, authentication, or encryption without going through the trouble of setting up a UWSGI proxy. * enable support for X-Forwarded-Proto headers from #395 --- docs/manual/usage.rst | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/manual/usage.rst b/docs/manual/usage.rst index 522e35ae..289284cf 100644 --- a/docs/manual/usage.rst +++ b/docs/manual/usage.rst @@ -189,3 +189,29 @@ See the `Nginx Docs `_ for a lot more details on how } } +Sample Apache Configuration +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The following Apache configuration snippet can be used to deploy pywb *without* uwsgi. A configuration with uwsgi is also probably possible but this covers the simplest case of launching the `wayback` binary directly. + +The configuration assumes pywb is running on port 8080 on localhost, but it could be on a different machine as well. + +.. code:: apache + + + ServerName proxy.example.com + Redirect / https://proxy.example.com/ + DocumentRoot /var/www/html/ + + + + ServerName proxy.example.com + SSLEngine on + DocumentRoot /var/www/html/ + ErrorDocument 404 /404.html + ProxyPreserveHost On + ProxyPass /.well-known/ ! + ProxyPass / http://localhost:8080/ + ProxyPassReverse / http://localhost:8080/ + RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME} +