-
Notifications
You must be signed in to change notification settings - Fork 506
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
server { | ||
|
||
listen 80; | ||
listen 80; | ||
|
||
# Location block for index.html with a 6-hour cache | ||
location = /index.html { | ||
root /usr/share/nginx/html; | ||
add_header Cache-Control "public, max-age=21600, must-revalidate"; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
# Location block for index.html with a 6-hour cache | ||
location = /index.html { | ||
root /usr/share/nginx/html; | ||
add_header Cache-Control "public, max-age=21600, must-revalidate"; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
|
||
# Location block for all other files with a 7-day cache | ||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
try_files $uri $uri/ /index.html; | ||
add_header Cache-Control "public, max-age=604800, must-revalidate"; | ||
} | ||
# Location block for all other files with a 7-day cache | ||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
try_files $uri $uri/ /index.html; | ||
add_header Cache-Control "public, max-age=604800, must-revalidate"; | ||
} | ||
|
||
|
||
error_page 500 502 503 504 /50x.html; | ||
error_page 500 502 503 504 /50x.html; | ||
|
||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
} |