From 5903ba2a5eeef35040d6fce665e590e68213d07c Mon Sep 17 00:00:00 2001 From: shockrah Date: Sat, 11 Feb 2023 21:14:49 -0800 Subject: [PATCH] Updating nginx config to now include resume.shockrah.xyz in the fun :) Also nginx.conf now has some gzip configuration parameters set, courtesy of: https://www.techrepublic.com/article/how-to-configure-gzip-compression-with-nginx/ --- .gitignore | 1 + docker/beta/Dockerfile | 6 +++++- docker/beta/nginx.conf | 24 +++++++++++++----------- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index bd8fba7..b937d26 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ playbooks/env/ playbooks/beta/files/*.pub docker/beta/shockrah.xyz/ +docker/beta/resume.shockrah.xyz/ diff --git a/docker/beta/Dockerfile b/docker/beta/Dockerfile index b634d98..1cce505 100644 --- a/docker/beta/Dockerfile +++ b/docker/beta/Dockerfile @@ -1,5 +1,9 @@ FROM nginx ARG SRC RUN mkdir -p /var/www/blog.shockrah.xyz -COPY shockrah.xyz /var/www/blog.shockrah.xyz + +# TODO: let's not make this permanent +COPY shockrah.xyz /var/www/shockrah.xyz +COPY resume.shockrah.xyz /var/www/resume.shockrah.xyz + COPY nginx.conf /etc/nginx/nginx.conf diff --git a/docker/beta/nginx.conf b/docker/beta/nginx.conf index 1eb8d93..f09ace6 100644 --- a/docker/beta/nginx.conf +++ b/docker/beta/nginx.conf @@ -26,22 +26,24 @@ http { #tcp_nopush on; keepalive_timeout 65; - #gzip on; + gzip on; + gzip_min_length 2048; + gzip_proxied expired no-cache no-store private auth; + gzip_types text/plain text/xml text/javascript application/x-jacascript application/xml; + gzip_disable "MSIE [1-6]\."; include /etc/nginx/conf.d/*.conf; - # Testing blog routing server { - server_name "blog.shockrah.xyz"; + server_name "shockrah.xyz"; location / { - root /var/www/blog.shockrah.xyz; - } - } - - server { - server_name "wiki.shockrah.xyz"; - location / { - return 200 'Reading wiki.shockrah.xyz'; + root /var/www/shockrah.xyz; } } + server { + server_name "resume.shockrah.xyz"; + location / { + root /var/www/resume.shockrah.xyz; + } + } }