Updated Tutorial: Creating a (micro) service (asciidoc)

This commit is contained in:
Federico Ceratto 2017-02-23 18:04:33 +00:00
parent 3a19246653
commit d22b24bf5a
1 changed files with 26 additions and 0 deletions

View File

@ -171,6 +171,32 @@ sd.ping_watchdog()
To generate application metrics for StatsD use https://github.com/FedericoCeratto/nim-statsd-client[StatsD client] 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
----