From fb637074869282b95ee627062427fcb122fd4970 Mon Sep 17 00:00:00 2001 From: victoriafabriss Date: Thu, 30 Nov 2023 11:22:56 -0300 Subject: [PATCH] Fix(nginx): Fixed nginx static files location --- infra/nginx/conf.d/fallback_server.conf | 8 -------- infra/nginx/vhost.d/default | 3 +++ infra/server/start_nginx_acme.sh | 1 + 3 files changed, 4 insertions(+), 8 deletions(-) delete mode 100644 infra/nginx/conf.d/fallback_server.conf create mode 100644 infra/nginx/vhost.d/default diff --git a/infra/nginx/conf.d/fallback_server.conf b/infra/nginx/conf.d/fallback_server.conf deleted file mode 100644 index d01f612..0000000 --- a/infra/nginx/conf.d/fallback_server.conf +++ /dev/null @@ -1,8 +0,0 @@ -server { - listen 80 default_server; - root /usr/share/nginx/static; - - location /static { - alias /usr/share/nginx/static; - } -} diff --git a/infra/nginx/vhost.d/default b/infra/nginx/vhost.d/default new file mode 100644 index 0000000..c05368f --- /dev/null +++ b/infra/nginx/vhost.d/default @@ -0,0 +1,3 @@ +location /static { + alias /usr/share/nginx/static; +} \ No newline at end of file diff --git a/infra/server/start_nginx_acme.sh b/infra/server/start_nginx_acme.sh index 093785b..25bbaa4 100644 --- a/infra/server/start_nginx_acme.sh +++ b/infra/server/start_nginx_acme.sh @@ -16,6 +16,7 @@ docker run --detach \ --volume ./infra/nginx/conf.d/custom_proxy.conf:/etc/nginx/conf.d/custom_proxy.conf \ --volume ./infra/nginx/conf.d/fallback_server.conf:/etc/nginx/conf.d/fallback_server.conf \ --volume staticfiles:/usr/share/nginx/static \ + --volume ./infra/nginx/vhost.d/default:/etc/nginx/vhost.d/default \ --network shared \ nginxproxy/nginx-proxy