Skip to content

A self-hosted media server and file management system

fix: nginx can't resolve ws domain on first docker boot

aminnausin6a90b6efffce
diff --git a/docker/etc/nginx/conf.d/default.conf b/docker/etc/nginx/conf.d/default.conf
index e73ecaae..c2518b3c 100644
--- a/docker/etc/nginx/conf.d/default.conf
+++ b/docker/etc/nginx/conf.d/default.conf
@@ -2,9 +2,14 @@ server {
listen 8080;
server_name _;
+ resolver 127.0.0.11 valid=10s;
+
root /var/www/html/public;
location ~ ^/(app|apps)/ {
+ set $ws_upstream "ws:6001";
+ proxy_pass http://$ws_upstream;
+
proxy_http_version 1.1;
proxy_set_header Host $host;
@@ -23,7 +28,8 @@ server {
proxy_send_timeout 60s;
proxy_read_timeout 60s;
- proxy_pass http://ws:6001;
+ proxy_intercept_errors on;
+ error_page 502 503 504 =404 /404;
}
index index.php;