forked from Painted-Fox/docker-nginx-php5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx-site.conf
37 lines (29 loc) · 940 Bytes
/
nginx-site.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
# Nginx site with PHP enabled.
server {
listen 80 default_server;
#listen [::]:80 default_server ipv6only=on;
root /data;
index index.html index.php;
# Make site accessible from http://localhost/
server_name localhost;
#Specify a charset
charset utf-8;
# Custom 404 page
error_page 404 /404.html;
# Include component config parts
include conf/expires.conf;
include conf/x-ua-compatible.conf;
include conf/cross-domain-fonts.conf;
include conf/protect-system-files.conf;
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
}
}