Skip to content

Commit

Permalink
Fix paths so /forum works and is redirected to by default
Browse files Browse the repository at this point in the history
  • Loading branch information
halfwit committed Jan 27, 2021
1 parent 0949d94 commit d0c9ef0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion config/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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)(/.+)$;
Expand Down
2 changes: 1 addition & 1 deletion forum/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit d0c9ef0

Please sign in to comment.