Skip to content

Commit 40f904a

Browse files
anarcatikreymer
authored andcommitted
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
1 parent a52fdee commit 40f904a

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

docs/manual/usage.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,3 +189,29 @@ See the `Nginx Docs <https://nginx.org/en/docs/>`_ for a lot more details on how
189189
}
190190
}
191191
192+
Sample Apache Configuration
193+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
194+
195+
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.
196+
197+
The configuration assumes pywb is running on port 8080 on localhost, but it could be on a different machine as well.
198+
199+
.. code:: apache
200+
201+
<VirtualHost *:80>
202+
ServerName proxy.example.com
203+
Redirect / https://proxy.example.com/
204+
DocumentRoot /var/www/html/
205+
</VirtualHost>
206+
207+
<VirtualHost *:443>
208+
ServerName proxy.example.com
209+
SSLEngine on
210+
DocumentRoot /var/www/html/
211+
ErrorDocument 404 /404.html
212+
ProxyPreserveHost On
213+
ProxyPass /.well-known/ !
214+
ProxyPass / http://localhost:8080/
215+
ProxyPassReverse / http://localhost:8080/
216+
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
217+
</VirtualHost>

0 commit comments

Comments
 (0)