Add default mime type in nginx.conf
This commit is contained in:
parent
970b5cc41a
commit
8564409e57
@ -11,13 +11,16 @@ http {
|
|||||||
|
|
||||||
include mime.types;
|
include mime.types;
|
||||||
charset utf-8;
|
charset utf-8;
|
||||||
|
default_type text/html;
|
||||||
|
|
||||||
try_files $uri $uri/ $uri.html =404;
|
try_files $uri $uri/ $uri.html =404;
|
||||||
|
|
||||||
|
# return `/posts/index.html` from `/posts`
|
||||||
location = /posts {
|
location = /posts {
|
||||||
rewrite ^ /posts/ break;
|
rewrite ^ /posts/ break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# redirect requests ending in a forward slash
|
||||||
location ~ ^/(.+)/$ {
|
location ~ ^/(.+)/$ {
|
||||||
return 302 /$1;
|
return 302 /$1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user