diff options
Diffstat (limited to 'main/docker/nginx')
-rwxr-xr-x | main/docker/nginx/Dockerfile | 2 | ||||
-rwxr-xr-x | main/docker/nginx/default.conf | 28 |
2 files changed, 30 insertions, 0 deletions
diff --git a/main/docker/nginx/Dockerfile b/main/docker/nginx/Dockerfile new file mode 100755 index 0000000..7d2fbc3 --- /dev/null +++ b/main/docker/nginx/Dockerfile @@ -0,0 +1,2 @@ +FROM nginx:alpine +COPY default.conf /etc/nginx/conf.d/default.conf diff --git a/main/docker/nginx/default.conf b/main/docker/nginx/default.conf new file mode 100755 index 0000000..8ae7bb8 --- /dev/null +++ b/main/docker/nginx/default.conf @@ -0,0 +1,28 @@ +server { + listen 80; + root /app/public; + server_name ""; + + access_log /app/app/logs/nginx-access.log; + + add_header X-Frame-Options SAMEORIGIN; + add_header X-Content-Type-Options nosniff; + + location = /index.php { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_keep_conn on; + fastcgi_pass php:9000; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } + location ~* \.(png|gif|jpg|jpeg|ico|css|js|woff|ttf|otf|woff2|eot)$ { + include /etc/nginx/mime.types; + expires max; + try_files $uri /index.php?$query_string; + } + location / { + index index.php; + try_files $uri /index.php?$query_string; + } +} |