=== modified file 'src/docbkx/en/dhis2_implementation_guide_installation.xml' --- src/docbkx/en/dhis2_implementation_guide_installation.xml 2013-06-06 20:16:48 +0000 +++ src/docbkx/en/dhis2_implementation_guide_installation.xml 2013-09-01 20:15:45 +0000 @@ -175,20 +175,15 @@
Basic setup for nginx - We recommend using nginx (http://wiki.nginx.org) as reverse proxy due to its low memory footprint and ease of use. To get the latest version we recommend installing from source: - sudo apt-get install make gcc libpcre3 libpcre3-dev zlibc zlib1g zlib1g-dev libssl-dev openssl - wget http://nginx.org/download/nginx-1.2.6.tar.gz -tar xzvf nginx-1.2.6.tar.gz -cd nginx-1.2.6 -./configure --with-http_ssl_module -make -sudo make install - - nginx can now be started and stopped with the following commands: - sudo /usr/local/nginx/sbin/nginx -sudo /usr/local/nginx/sbin/nginx -s stop + We recommend using nginx (http://wiki.nginx.org) as reverse proxy due to its low memory + footprint and ease of use. To install invoke the following: + sudo apt-get install nginx + nginx can now be started, reloaded and stopped with the following commands: + sudo /etc/init.d/nginx start +sudo /etc/init.d/nginx reload +sudo /etc/init.d/nginx stop Now that we have installed nginx we will now continue to configure regular proxying of requests to our Tomcat instance, which we assume runs at http://localhost:8080. To configure nginx you can open the configuration file by invoking - sudo nano /usr/local/nginx/conf/nginx.conf + sudo nano /etc/nginx/nginx.conf nginx configuration is built around a hierarchy of blocks representing http, server and location, where each block inherit settings from parent blocks. The following snippet will configure nginx to proxy pass (redirect) requests from port 80 (which is the port nginx will listen on by default) to our Tomcat instance. It will also make nginx serve requests for static content such as javascript, stylesheets and images and instruct clients to cache it for 4 days which will reduce the load on Tomcat and improve overall performance. Include the following configuration in nginx.conf:
- Control scripts for nginx + Starting tomcat and nginx on boot-time In certain situations a server might reboot unexpectedly. It is hence preferable to have Tomcat and nginx start automatically when the server starts. To achieve that the first step is to create init scripts. Create a new file called tomcat and paste the below content into it (adjust the HOME variable to your environment): #!/bin/sh #Tomcat init script @@ -360,30 +355,12 @@ ;; esac exit 0 - Create a new file called nginx and paste the below content into it: - #!/bin/sh -#nginx init script - -DAEMON=/usr/local/nginx/sbin/nginx - -case $1 in -start) - start-stop-daemon --start --exec $DAEMON - ;; -stop) - start-stop-daemon --stop --exec $DAEMON - ;; -restart) - start-stop-daemon --stop --exec $DAEMON - sleep 1 - start-stop-daemon --start --exec $DAEMON - ;; -esac -exit 0 - Move both scripts to the init script directory and make them executable by invoking: - sudo mv tomcat nginx /etc/init.d -sudo chmod +x /etc/init.d/nginx /etc/init.d/tomcat - Next make sure the init scripts will be invoked during system startup and shutdown: + Move the script to the init script directory and make them executable by + invoking: + sudo mv tomcat /etc/init.d +sudo chmod +x /etc/init.d/tomcat + Next make sure the tomcat and nginx init scripts will be invoked during system startup + and shutdown: sudo /usr/sbin/update-rc.d -f nginx defaults 80 sudo /usr/sbin/update-rc.d -f tomcat defaults 81 Tomcat and nginx will now be started at system startup and stopped at system shutdown. If you later need to revert this you can replace defaults with remove and invoke the above commands again. === modified file 'src/docbkx/en/resources/css/docbook_bsd.css' --- src/docbkx/en/resources/css/docbook_bsd.css 2013-04-09 09:58:16 +0000 +++ src/docbkx/en/resources/css/docbook_bsd.css 2013-09-01 20:15:45 +0000 @@ -170,8 +170,9 @@ } .SCREEN { - padding: 1ex; -} + padding: 1ex; + color: #2B8328; +} .PROGRAMLISTING { padding: 1ex;