From d60c0212e7a8514c3be90a034cbf0a65044f70b7 Mon Sep 17 00:00:00 2001 From: gideonwolfe Date: Wed, 26 Aug 2020 15:44:46 -0700 Subject: [PATCH] added better nginx conf to disable cache --- docker/data/default.conf | 46 ++++++++++++++++++++++++++++++++++++++ docker/docker-compose.yaml | 1 + 2 files changed, 47 insertions(+) create mode 100644 docker/data/default.conf diff --git a/docker/data/default.conf b/docker/data/default.conf new file mode 100644 index 0000000..370af14 --- /dev/null +++ b/docker/data/default.conf @@ -0,0 +1,46 @@ +server { + listen 80; + listen [::]:80; + server_name localhost; + + #charset koi8-r; + #access_log /var/log/nginx/host.access.log main; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + expires -1; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + + # proxy the PHP scripts to Apache listening on 127.0.0.1:80 + # + #location ~ \.php$ { + # proxy_pass http://127.0.0.1; + #} + + # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 + # + #location ~ \.php$ { + # root html; + # fastcgi_pass 127.0.0.1:9000; + # fastcgi_index index.php; + # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; + # include fastcgi_params; + #} + + # deny access to .htaccess files, if Apache's document root + # concurs with nginx's one + # + #location ~ /\.ht { + # deny all; + #} +} diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index 7c07022..b5756fc 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -8,6 +8,7 @@ services: - $HOME/.cache/StartTree/index.html:/usr/share/nginx/html/index.html - $HOME/.cache/StartTree/styles/style.css:/usr/share/nginx/html/styles/style.css - $HOME/.cache/StartTree/styles/Hack.ttf:/usr/share/nginx/html/styles/Hack.ttf + - $HOME/.cache/StartTree/default.conf:/etc/nginx/conf.d/default.conf # modified conf to disable page caching :) ports: - "9876:80" environment: