added nginx config and rewrote Dockerfile and gitlab ci
This commit is contained in:
+36
@@ -0,0 +1,36 @@
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
log_format compression '$remote_addr - $remote_user [$time_local] '
|
||||
'"$request" $status $upstream_addr '
|
||||
'"$http_referer" "$htpp_user_agent"';
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
access_log /var/log/nginx/access.log compression;
|
||||
|
||||
root /var/www;
|
||||
index index.html index.htm;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
|
||||
expires 1M;
|
||||
access_log off;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
location ~* \.(?:css|js)$ {
|
||||
try_files $uri =404;
|
||||
expires 1y;
|
||||
access_log off;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
location ~ ^.+\..+$ {
|
||||
try_files $uri =404;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user