-
Notifications
You must be signed in to change notification settings - Fork 73
/
Copy pathnginx.conf
42 lines (35 loc) · 1.16 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
42
server
{
listen 80;
server_name www.order.com;
index index.html index.htm index.php;
root /usr/local/var/www/weixin-order/web;
#error_page 404 /404.html;
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
#location ~ .*\.(js|css)?$
#{
# expires 12h;
#}
#location ~ /\.
#{
# deny all;
#}
# 访问更目录时,如果没有请求到文件,就默认隐藏index.php,适合yii的美化路由配置
location / {
if (!-e $request_filename){
rewrite ^/(.*) /index.php last;
}
}
access_log /usr/local/var/log/nginx/servers/www.order.com.access.log;
error_log /usr/local/var/log/nginx/servers/www.order.com.error.log;
}