From ba04d232e87a4f67f4be85432da093f74e1f8b96 Mon Sep 17 00:00:00 2001 From: Stefan Tatschner Date: Sat, 6 Jun 2015 11:51:28 +0200 Subject: [PATCH] Fix typos and formatting in reverseproxy.rst It is: .. code-block:: LANGUAGE Awesome Sourcecode --- users/reverseproxy.rst | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/users/reverseproxy.rst b/users/reverseproxy.rst index d4a430ba1..4e32020d1 100644 --- a/users/reverseproxy.rst +++ b/users/reverseproxy.rst @@ -4,26 +4,27 @@ Reverse Proxy Setup =================== A reverse proxy allow you to "pass" requests through your web server to another -site or program. The reverse proxy will make it look like Syncthing's GUI -is a page within your existing site. +site or program. The reverse proxy will make it look like Syncthing's GUI is a +page within your existing site. This is especially useful if: -- You need to access the GUI on port 80 or 443 but you already host a website on the same device. -- You want to share SSL certificates with an existing site. -- You want to share authentification with an existing setup. +- You need to access the GUI on port 80 or 443 but you already host a website + on the same device. +- You want to share SSL certificates with an existing site. +- You want to share authentification with an existing setup. Server Configuration -------------------- If you have access to your web server's configuration use the following -examples to pass the location **/syncthing** on your web server to Syncthing's -GUI hosted on **localhost:8384**. +examples to pass the location ``/syncthing`` on your web server to Syncthing's +GUI hosted on ``localhost:8384``. Apache ~~~~~~ -:: +.. code-block:: apache ProxyPass /syncthing/ http://localhost:8384/ @@ -35,14 +36,14 @@ Apache Nginx ~~~~~ -:: +.. code-block:: nginx location /syncthing/ { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - + proxy_pass http://localhost:8384/; } @@ -55,11 +56,11 @@ the following technique. Apache ~~~~~~ -Add the configuration bellow to a **.htaccess** file in the folder of your -webroot which should redirect to the WebUI, **/syncthing** to produce the same +Add the configuration below to a ``.htaccess`` file in the folder of your +webroot which should redirect to the WebUI, ``/syncthing`` to produce the same behaviour as above -:: +.. code-block:: apache RewriteEngine On RewriteCond %{HTTPS} !=on