From d22b24bf5acebe405374328f5c6accb4eed083f1 Mon Sep 17 00:00:00 2001 From: Federico Ceratto Date: Thu, 23 Feb 2017 18:04:33 +0000 Subject: [PATCH] Updated Tutorial: Creating a (micro) service (asciidoc) --- Tutorial:-Creating-a-(micro)-service.asciidoc | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Tutorial:-Creating-a-(micro)-service.asciidoc b/Tutorial:-Creating-a-(micro)-service.asciidoc index 28a221b..0c905a9 100644 --- a/Tutorial:-Creating-a-(micro)-service.asciidoc +++ b/Tutorial:-Creating-a-(micro)-service.asciidoc @@ -171,6 +171,32 @@ sd.ping_watchdog() To generate application metrics for StatsD use https://github.com/FedericoCeratto/nim-statsd-client[StatsD client] +=== Running Jester behind Nginx +Nginx is commonly used as a reverse proxy for webservices. +Edit /etc/nginx/sites-enabled/default and add: +[source,php] +---- +server { + listen 443; + server_name www.REPLACEME.org; + # Comment out the next 3 lines to disable SSL + ssl on; + ssl_certificate /etc/REPLACEME/fullchain.pem; + ssl_certificate_key /etc/REPLACEME/privkey.pem; + access_log /var/log/REPLACEME.log; + location / { + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $host; + # Jester listens on port 5000 by default + proxy_pass http://127.0.0.1:5000; + } +} +---- +Reload Nginx and monitor the logfile: +[source,bash] +---- +sudo service nginx reload +---- \ No newline at end of file