ico
This commit is contained in:
14
nginx.conf
14
nginx.conf
@@ -4,13 +4,25 @@ server {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# Favicon
|
||||
location = /favicon.ico {
|
||||
try_files /favicon.ico =204;
|
||||
access_log off;
|
||||
log_not_found off;
|
||||
}
|
||||
|
||||
# Custom 404 page
|
||||
error_page 404 /404.html;
|
||||
location = /404.html {
|
||||
internal;
|
||||
}
|
||||
|
||||
# Enable clean URLs without .html extension
|
||||
location / {
|
||||
# Try the exact URI, then with .html, then as directory with index.html, then 404
|
||||
try_files $uri $uri.html $uri/ =404;
|
||||
}
|
||||
|
||||
|
||||
location = /index.html {
|
||||
try_files /index.html =404;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user