From d0c9ef053eac0ac32f8119ef0e9eb9b1c2a3ffbc Mon Sep 17 00:00:00 2001 From: halfwit Date: Wed, 27 Jan 2021 21:55:26 +0000 Subject: [PATCH] Fix paths so /forum works and is redirected to by default --- config/nginx.conf | 7 ++++++- forum/Dockerfile | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/config/nginx.conf b/config/nginx.conf index aad54f5..9a126ba 100644 --- a/config/nginx.conf +++ b/config/nginx.conf @@ -6,7 +6,12 @@ server { access_log /var/log/nginx/access.log; root /var/www; - + location /forum/ { } + + location = / { + rewrite ^/(.*)$ /forum/$1 redirect; + } + location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; diff --git a/forum/Dockerfile b/forum/Dockerfile index 529c203..235ca3b 100644 --- a/forum/Dockerfile +++ b/forum/Dockerfile @@ -10,7 +10,7 @@ RUN apt-get update && apt-get install -y \ && docker-php-ext-install calendar exif gd gettext mysql mysqli pdo_mysql RUN useradd fishy -COPY --chown=fishy:fishy . /var/www/ +COPY --chown=fishy:fishy . /var/www/forum USER fishy