=== 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; } }]]> You can now access your DHIS instance at http://localhost. Since the reverse proxy has been set up we can improve security by making Tomcat only listen for local connections. In /conf/server.xml you can add an address attribute with the value localhost to the Connetor element for HTTP 1.1 like this: @@ -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; } }]]> @@ -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 "Basic YWRtaW46ZGlzdHJpY3Q="; - proxy_set_header Cookie ""; - 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 "Basic YWRtaW46ZGlzdHJpY3Q="; + proxy_set_header Cookie ""; + proxy_hide_header Set-Cookie; } }