-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
executable file
·46 lines (36 loc) · 970 Bytes
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
upstream fastcgi_backend {
server fpm:9000;
}
server {
# listen 8000;
# server_name domain.tld www.domain.tld;
# wordpress entry point for all requests
root /var/www/project;
index index.php;
location / {
# try to serve file directly, fallback to index.php
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
fastcgi_pass fastcgi_backend;
include fastcgi_params;
fastcgi_intercept_errors on;
#The following parameter can be also included in fastcgi_params file
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.(?:ht|git|svn) {
return 404;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}
location = /status {
access_log off;
default_type text/plain;
add_header Content-Type text/plain;
return 200 "alive";
}
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
}