forked from lcx/nginx-fpm-reverse-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx_default.conf
34 lines (29 loc) · 925 Bytes
/
nginx_default.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
server {
listen 80;
index index.php;
server_name nginx;
root ROOT_DIRECTORY;
# cache static asset files
location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ {
expires max;
log_not_found off;
}
# for health checks
location /health {
return 200 'alive';
add_header Content-Type text/plain;
}
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ ^/index\.php(/|$) {
fastcgi_pass FPM_NGINX_HOST:FPM_NGINX_PORT;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
internal;
}
}
# mkdir -p .vim/syntax && wget -O .vim/syntax/nginx.vim http://www.vim.org/scripts/download_script.php\?src_id\=19394
# vim: set syntax=nginx ft=nginx: