=== modified file 'src/docbkx/en/dhis2_implementation_guide_installation.xml' --- src/docbkx/en/dhis2_implementation_guide_installation.xml 2012-12-18 14:28:29 +0000 +++ src/docbkx/en/dhis2_implementation_guide_installation.xml 2012-12-18 18:22:52 +0000 @@ -159,7 +159,10 @@ In order to improve security it is recommended to configure the server running DHIS to communicate with clients over an encrypted connection and to identify itself to clients using a trusted certificate. This can be achieved through SSL which is an cryptographic communication protocol running on top of TCP/IP. To configure nginx to use SSL you will need a proper SSL certificate from an SSL provider. The cost of a certificate varies a lot depending on encryption strength. An affordable certificate from Rapid SSL Online should serve most purposes. To generate the CSR (certificate signing request) you can invoke the command below. When you are prompted for the Common Name, enter the fully qualified domain name for the site you are securing. openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr - When you have your certificate files (.pem and .key) you will need to place them in a location which is reachable by nginx. A good location for this can be the same directory as where your nginx.conf file is located. + When you have received your certificate files (.pem or .crt) you will need to place it + together with the generated server.key file in a location which is reachable by nginx. A + good location for this can be the same directory as where your nginx.conf file is + located. Below is an nginx server block where the certificate files are named server.crt and server.key. Since SSL connections usually occur on port 443 (HTTPS) we pass requests on that port (443) on to the DHIS instance running on http://localhost:8080 The first server block will rewrite all requests connecting to port 80 and force the use of HTTPS/SSL. This is also necessary because DHIS is using a lot of redirects internally which must be passed on to use HTTPS. Remember to replace <server-ip> with the IP of your server. These blocks should replace the one from the previous section. Requests for reports, charts, maps and other analysis-related resources will often take some time to respond and might utilize a lot of server resources. In order to improve response times, reduce the load on the server and hide potential server downtime we can - introduce a cache proxy in our server setup. This setup will cache analysis related content - which typically requries the most server resources to produce. The cached content will be - stored in directory /var/cache/nginx, and up to 250 MB of storage will be allocated. Nginx - will create this directory automatically. + introduce a cache proxy in our server setup. The cached content will be stored in directory + /var/cache/nginx, and up to 250 MB of storage will be allocated. Nginx will create this + directory automatically. http { # ... root /home/dhis/tomcat/webapps/ROOT; # Update path!