← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-documenters/dhis2/dhis2-docbook-docs] Rev 631: Added detail to nginx config which has potential for creating late nights with frustration

 

------------------------------------------------------------
revno: 631
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2-docbook-docs
timestamp: Wed 2012-12-05 00:42:14 +0100
message:
  Added detail to nginx config which has potential for creating late nights with frustration
modified:
  src/docbkx/en/dhis2_implementation_guide_installation.xml


--
lp:~dhis2-documenters/dhis2/dhis2-docbook-docs
https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docs

Your team DHIS 2 developers is subscribed to branch lp:~dhis2-documenters/dhis2/dhis2-docbook-docs.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docs/+edit-subscription
=== modified file 'src/docbkx/en/dhis2_implementation_guide_installation.xml'
--- src/docbkx/en/dhis2_implementation_guide_installation.xml	2012-11-23 09:12:10 +0000
+++ src/docbkx/en/dhis2_implementation_guide_installation.xml	2012-12-04 23:42:14 +0000
@@ -142,9 +142,10 @@
   location / {
     proxy_pass        http://localhost:8080/;
     proxy_redirect    off;
-    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  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  http;
   }
 }]]></screen></para>
       <para>You can now access your DHIS instance at <emphasis role="italic">http://localhost</emphasis>. Since  the reverse proxy has been set up we can improve security by making Tomcat only listen for local connections. In <emphasis role="italic">/conf/server.xml</emphasis> you can add an <emphasis role="italic">address</emphasis> attribute with the value <emphasis role="italic">localhost</emphasis> to the Connetor element for HTTP 1.1 like this:</para>
@@ -193,9 +194,10 @@
   location / {
     proxy_pass        http://localhost:8080/;
     proxy_redirect    off;
-    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  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  https;
  }
 }]]></screen>
     </section>
@@ -262,14 +264,15 @@
       return 405;
     }
 
-    proxy_pass        http://localhost:8080;
-    proxy_redirect    off;
-    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  Authorization     &quot;Basic YWRtaW46ZGlzdHJpY3Q=&quot;;
-    proxy_set_header  Cookie            &quot;&quot;;
-    proxy_hide_header Set-Cookie;
+    proxy_pass         http://localhost:8080;
+    proxy_redirect     off;
+    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  http;
+    proxy_set_header   Authorization      &quot;Basic YWRtaW46ZGlzdHJpY3Q=&quot;;
+    proxy_set_header   Cookie             &quot;&quot;;
+    proxy_hide_header  Set-Cookie;
   }
 }</screen>
     </section>