1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-14 15:53:28 +01:00

docs: add sample nginx config to deployment section, mention how https is handled, fixes #314

This commit is contained in:
Ilya Kreymer 2018-04-02 17:23:04 -07:00
parent f32eb608f1
commit 8f981743ae
2 changed files with 34 additions and 0 deletions

View File

@ -156,3 +156,36 @@ For larger scale production deployments, running with `uwsgi <http://uwsgi-docs.
Although uwsgi does not provide a way to specify command line, all command line options can alternatively be configured via ``config.yaml``. See :ref:`configuring-pywb` for more info on available configuration options. Although uwsgi does not provide a way to specify command line, all command line options can alternatively be configured via ``config.yaml``. See :ref:`configuring-pywb` for more info on available configuration options.
Sample Nginx Configuration
^^^^^^^^^^^^^^^^^^^^^^^^^^
The following nginx configuration snippet can be used to deploy pywb with uwsgi and nginx.
The configuration assumes pywb is running the uwsgi protocol on port 8081, as is the default
when running ``uwsgi uwsgi.ini``.
The ``location /static`` block allows nginx to serve static files, and is an optional optimization.
This configuration can be updated to use HTTPS and run on 443, the ``UWSGI_SCHEME`` param ensures that pywb will use the correct scheme
when rewriting.
See the `Nginx Docs <https://nginx.org/en/docs/>`_ for a lot more details on how to configure Nginx.
.. code:: nginx
server {
listen 80;
location /static {
alias /path/to/pywb/static;
}
location / {
uwsgi_pass localhost:8081;
include uwsgi_params;
uwsgi_param UWSGI_SCHEME $scheme;
}
}

View File

@ -1,6 +1,7 @@
[uwsgi] [uwsgi]
if-not-env = PORT if-not-env = PORT
http-socket = :8080 http-socket = :8080
socket = :8081
endif = endif =
master = true master = true