Update
This commit is contained in:
parent
9ef3b652fc
commit
4dcc9e8424
|
@ -13,7 +13,7 @@ RUN wget http://nginx.org/keys/nginx_signing.key && \
|
||||||
|
|
||||||
ADD nginx.conf /app/code/nginx.conf.default
|
ADD nginx.conf /app/code/nginx.conf.default
|
||||||
ADD public /app/code/public.default
|
ADD public /app/code/public.default
|
||||||
ADD fpm.conf /etc/php/7.0/fpm/php-fpm.conf
|
ADD fpm.conf /etc/php/7.2/fpm/php-fpm.conf
|
||||||
ADD start.sh /app/code/start.sh
|
ADD start.sh /app/code/start.sh
|
||||||
|
|
||||||
RUN mkdir /run/nginx && \
|
RUN mkdir /run/nginx && \
|
||||||
|
|
21
nginx.conf
21
nginx.conf
|
@ -14,13 +14,21 @@ http {
|
||||||
sendfile on;
|
sendfile on;
|
||||||
keepalive_timeout 65;
|
keepalive_timeout 65;
|
||||||
|
|
||||||
|
gzip on;
|
||||||
|
gzip_http_version 1.1;
|
||||||
|
gzip_vary on;
|
||||||
|
gzip_comp_level 6;
|
||||||
|
gzip_proxied any;
|
||||||
|
gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript text/x-js;
|
||||||
|
gzip_buffers 16 8k;
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 8000;
|
listen 8000;
|
||||||
|
|
||||||
root /app/data/public;
|
root /app/data/public;
|
||||||
index index.php index.html index.htm;
|
index index.php index.html index.htm;
|
||||||
|
|
||||||
try_files $uri $uri/ =404;
|
try_files $uri $uri/index.html $uri/ =404;
|
||||||
absolute_redirect off;
|
absolute_redirect off;
|
||||||
|
|
||||||
# Uncomment to add a redirect
|
# Uncomment to add a redirect
|
||||||
|
@ -55,6 +63,17 @@ http {
|
||||||
location ~ /\.ht {
|
location ~ /\.ht {
|
||||||
deny all;
|
deny all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Cache statif files
|
||||||
|
location ~* \.html$ {
|
||||||
|
expires 1h;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~* \.(ogg|ogv|svg|svgz|eot|otf|woff|woff2|mp4|mp3|ttf|css|rss|atom|js|jpg|jpeg|webp|webm|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)(\?.+)?$ {
|
||||||
|
access_log off;
|
||||||
|
log_not_found off;
|
||||||
|
expires max;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue