-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
41 lines (33 loc) · 1.13 KB
/
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
server {
charset utf-8;
client_max_body_size 128M;
listen 80; ## listen for ipv4
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6
server_name xxxxx.com;
root /path/to/xxxxx.com/public/;
index index.php;
access_log /data/log/nginx/xxxxx.com-access.log;
error_log /data/log/nginx/xxxxx.com-error.log;
error_page 404 http://xxxxx.com/not_found.html;
error_page 500 502 503 504 http://xxxxx.com/server_busy.html;
location / {
# Redirect everything that isn't a real file to index.php
try_files $uri $uri/ /index.php$is_args$args;
}
# uncomment to avoid processing of calls to non-existing static files by Yii
location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
access_log off;
expires 30d;
try_files $uri =404;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/var/run/php5-fpm.sock;
try_files $uri =404;
}
location ~ /\.(ht|svn|git) {
deny all;
}
}