Skip to content

Commit

Permalink
Fix nginx conf
Browse files Browse the repository at this point in the history
  • Loading branch information
frafra committed Feb 9, 2024
1 parent 28a019a commit 0e579e3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 22 deletions.
11 changes: 5 additions & 6 deletions nginx/default.conf.template
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
upstream titiler {
server titiler:8080;
keepalive 64;
}

server {
listen 80;
server_name localhost;

resolver 127.0.0.11 ipv6=off;
root /var/www;
absolute_redirect off;

location /tiler/ {
proxy_pass http://titiler;
set $titiler titiler:8080;
proxy_pass http://$titiler;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
Expand Down
23 changes: 7 additions & 16 deletions nginx/dev.conf.template
Original file line number Diff line number Diff line change
@@ -1,36 +1,27 @@
upstream titiler {
server titiler:8080;
keepalive 64;
}

server {
listen 80;
server_name localhost;
resolver 127.0.0.11 ipv6=off;
root /var/www;
absolute_redirect off;

location ~* ^/data/(.+) {
try_files $uri $uri/;
}

location /tiler/ {
proxy_pass http://titiler;
set $titiler titiler:8080;
proxy_pass http://$titiler;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}

location /data/ {
try_files $uri $uri/;
}

location / {
proxy_pass http://vite:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

0 comments on commit 0e579e3

Please sign in to comment.