From c989e8a74acc7008f90d400c8b0f6be282a640d5 Mon Sep 17 00:00:00 2001 From: Stefan Verhoeven Date: Tue, 27 Sep 2016 17:49:53 +0200 Subject: [PATCH] Better NGINX + hostname docs --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 72c8c4b..ee184d7 100644 --- a/README.md +++ b/README.md @@ -30,10 +30,14 @@ How to run the container: docker run -d -p 3000:3000 -p 8080:8080 -p 8181:8181 sverhoeven/cartodb ``` -You need to add `config/cartodb.nginx.proxy.conf` to /etc/nginx/conf.d/. -This will setup a reverse proxy for the CartoDB/imports (3000), SQL Api (8080) and Map api (8181). +The ports the cartodb container publishes must be combined behind a single [NGINX](http://nginx.org/) web server. +In the GitHub repo there is an [example NGINX config file (config/cartodb.nginx.proxy.conf)](https://github.com/sverhoeven/docker-cartodb/blob/master/config/cartodb.nginx.proxy.conf), which needs to be added to /etc/nginx/conf.d/ directory, after which the web server must be restarted. +This will setup a reverse proxy for the CartoDB/imports (3000), SQL Api (8080) and Map api (8181) to default http port (80). +Alternativly use instructions at https://hub.docker.com/r/spawnthink/cartodb-nginx/ to run NGINX as a docker container with the correct config file already in it. -You also need to add cartodb.localhost alias to your hosts file. For example +The CartoDB instance has been configured with the hostname `cartodb.localhost`, this means the web browser and web server need to be able to resolve `cartodb.localhost` to the machine where the web server is running. +This can be done by adding cartodb.localhost alias to your hosts file. For example ``` sudo sh -c 'echo 127.0.1.1 cartodb.localhost >> /etc/hosts' ``` +(For Windows it will be `C:\Windows\System32\drivers\etc\lmhosts`)