-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathnginx.conf
45 lines (33 loc) · 972 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
server {
listen 80;
server_name _;
charset utf-8;
root /usr/share/nginx/html;
index index.php index.html index.htm;
gzip on;
gzip_disable "msie6";
gzip_types text/plain text/css text/xml text/javascript application/json
application/x-javascript application/xml application/xml+rss application/javascript;
error_page 404 = /index.php;
access_log off;
error_log /var/log/nginx/error.log crit;
client_max_body_size 64m;
location / {
try_files $uri $uri/ /index.php?$args;
}
location /. {
return 404;
}
location ~ \.php$ {
include fastcgi_params;
try_files $uri =404;
fastcgi_pass php:9000;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_read_timeout 300;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
}
location ~ /\.ht {
deny all;
}
}