Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michael Iseard
Wordpress Docker
Commits
ec180fdb
Commit
ec180fdb
authored
Nov 29, 2019
by
Michael Iseard
Browse files
Update nginx config
parent
511cf507
Changes
3
Hide whitespace changes
Inline
Side-by-side
nginx/conf.d/caching.conf
deleted
100644 → 0
View file @
511cf507
# Caching
fastcgi_cache_path
/
var
/
run
/
nginx
-
cache
levels
=
1
:
2
keys_zone
=
WORDPRESS
:
100
m
inactive
=
60
m
;
fastcgi_cache_key
"$scheme$request_method$host$request_uri"
;
nginx/conf.d/default.conf
View file @
ec180fdb
server
{
listen
80
;
server_name
127
.
0
.
0
.
1
;
server_name
diamant
.
iseard
.
media
;
root
/
var
/
www
/
html
;
index
index
.
php
;
access_log
/
var
/
log
/
nginx
/
access
.
log
;
error_log
/
var
/
log
/
nginx
/
error
.
log
;
location
/ {
try_files
$
uri
$
uri
/ /
index
.
php
?$
args
;
}
location
~ \.
php
$ {
try_files
$
uri
=
404
;
fastcgi_split_path_info
^(.+\.
php
)(/.+)$;
fastcgi_pass
wordpress
:
9000
;
fastcgi_index
index
.
php
;
include
fastcgi_params
;
fastcgi_param
SCRIPT_FILENAME
$
document_root
$
fastcgi_script_name
;
fastcgi_param
PATH_INFO
$
fastcgi_path_info
;
}
include
snippets
/
wordpress
.
conf
;
}
nginx/snippets/wordpress.conf
View file @
ec180fdb
...
...
@@ -96,13 +96,11 @@ gzip_types text/plain text/css application/json application/javascript applicati
# Pass all .php files onto a php-fpm/php-fcgi server.
location
~ \.
php
$ {
include
fastcgi
.
conf
;
fastcgi_intercept_errors
on
;
fastcgi_pass
unix
:/
run
/
php
/
php7
.
0
-
fpm
.
sock
;
# enable cache
add_header
X
-
WP
-
Cache
$
upstream_cache_status
;
fastcgi_cache_bypass
$
skip_cache
;
fastcgi_no_cache
$
skip_cache
;
fastcgi_cache
WORDPRESS
;
fastcgi_cache_valid
200
60
m
;
try_files
$
uri
=
404
;
fastcgi_split_path_info
^(.+\.
php
)(/.+)$;
fastcgi_pass
wordpress
:
9000
;
fastcgi_index
index
.
php
;
include
fastcgi_params
;
fastcgi_param
SCRIPT_FILENAME
$
document_root
$
fastcgi_script_name
;
fastcgi_param
PATH_INFO
$
fastcgi_path_info
;
}
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