Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
docker-php-yii2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dmstr
docker-php-yii2
Commits
e89049b9
Commit
e89049b9
authored
Dec 21, 2016
by
Tobias Munk
Committed by
GitHub
Dec 21, 2016
1
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3 from handcode/master
add expire header for static content
parents
1afa3e5b
27b81824
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
nginx.conf
nginx/image-files/etc/nginx/nginx.conf
+13
-1
No files found.
nginx/image-files/etc/nginx/nginx.conf
View file @
e89049b9
...
...
@@ -40,6 +40,9 @@ http {
gzip
on
;
# don't use etag with expire
etag
off
;
server
{
charset
utf-8
;
client_max_body_size
512M
;
...
...
@@ -56,7 +59,16 @@ http {
}
# uncomment to avoid processing of calls to non-existing static files by Yii
location
~
\.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$
{
location
~
\.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar|svg)$
{
# set expire Header
expires
6M
;
#add_header Cache-Control "public";
add_header
Last-Modified
""
;
# keep logs clean
log_not_found
off
;
try_files
$uri
=
404
;
}
...
...
Tobias Munk
@t.munk
Mentioned in commit
5dd27584
·
Dec 22, 2016
Mentioned in commit
5dd27584
Mentioned in commit 5dd27584c8b718080ba83d0b15a7316836216a02
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment