mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
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
This commit is contained in:
parent
a52fdeef5b
commit
40f904af79
@ -189,3 +189,29 @@ See the `Nginx Docs <https://nginx.org/en/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
|
||||
|
||||
<VirtualHost *:80>
|
||||
ServerName proxy.example.com
|
||||
Redirect / https://proxy.example.com/
|
||||
DocumentRoot /var/www/html/
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost *:443>
|
||||
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}
|
||||
</VirtualHost>
|
||||
|
Loading…
x
Reference in New Issue
Block a user