bbf2c54325
* Use Varnish 3 from source tarball, newer and OS Varnish could not disable telnet authentication required by Carto * Remove sources of varnish, gdal, /cartodb/.git when no longer needed in order to make image smaller * Dropped Nokia and GMAP basemaps, they did not work * Dropped schema trigger installation, it is no longer needed * Configure Carto in Python and NodeJS * Build assets * Use self as asset_host, assets are hosted by nginx instead of rails
47 lines
1.5 KiB
Plaintext
47 lines
1.5 KiB
Plaintext
server {
|
|
server_name cartodb.localhost *.cartodb.localhost;
|
|
|
|
client_max_body_size 100M;
|
|
|
|
location ~* /(user/.*/)?api/v1/maps {
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_pass http://127.0.0.1:3000;
|
|
}
|
|
|
|
location ~* /(user/.*/)?api/v1/map {
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_pass http://127.0.0.1:8181;
|
|
}
|
|
|
|
location ~* /(user/.*)?/api/v2/sql {
|
|
# RedHog: Hack to work around bug in cartodb local hosting but using cdn for js libs
|
|
rewrite /(user/.*)?/api/v2/sql(.*) /$1/api/v2/sql$2 break;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_pass http://127.0.0.1:8080;
|
|
}
|
|
|
|
location ^~ /assets {
|
|
root /cartodb/public;
|
|
}
|
|
|
|
location / {
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_pass http://127.0.0.1:3000;
|
|
}
|
|
|
|
error_log /var/log/nginx/cartodb_error.log;
|
|
access_log /var/log/nginx/cartodb_access.log;
|
|
}
|