30 lines
806 B
Nginx Configuration File
30 lines
806 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
gzip on;
|
|
gzip_comp_level 6;
|
|
gzip_vary on;
|
|
gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/rss+xml text/javascript image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype;
|
|
|
|
location / {
|
|
root /usr/share/nginx/html;
|
|
try_files $uri /index.html;
|
|
}
|
|
|
|
#error_page 404 /404.html;
|
|
|
|
# redirect server error pages to the static page /50x.html
|
|
#
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root /usr/share/nginx/html;
|
|
}
|
|
|
|
# deny access to hidden files like .git etc
|
|
# concurs with nginx's one
|
|
#
|
|
location ~ /\. {
|
|
deny all;
|
|
}
|
|
}
|