Skip to content

Commit 060b5e8

Browse files
committed
修改配置文件
1 parent 29565c1 commit 060b5e8

File tree

1 file changed

+5
-31
lines changed

1 file changed

+5
-31
lines changed

conf/nginx_vhost.conf

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,18 @@
11
server {
22
listen 80;
33
server_name domain;
4-
access_log /data/www/logs/nginx_access_domain.log;
4+
access_log /data/logs/nginx/nginx_access_domain.log;
55
index index.html index.htm index.php;
6-
root /data/www/root/domain;
7-
8-
location ~ .*\.(php|php5)?$ {
9-
fastcgi_pass 127.0.0.1:9000;
10-
fastcgi_index index.php;
11-
include ../fastcgi.conf;
12-
}
13-
6+
root /data/www/domain;
147
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
158
expires 30d;
169
}
17-
18-
location ~ .*\.(js|css)?$ {
10+
location ~ .*\.(js|css)?$ {
1911
expires 1h;
2012
}
21-
22-
location / {
23-
index index.htm index.html index.php;
24-
if (!-e $request_filename) {
25-
rewrite ^/(.*)$ /index.php/$1 last;
26-
break;
27-
}
28-
}
29-
30-
location ~ \.php/?.*$ {
31-
root /data/www/root/domain;
13+
location ~ [^/]\.php(/|$) {
3214
fastcgi_pass 127.0.0.1:9000;
3315
fastcgi_index index.php;
34-
include ../fastcgi.conf;
35-
set $fastcgi_script_name2 $fastcgi_script_name;
36-
if ($fastcgi_script_name ~ "^(.+\.php)(/.+)$") {
37-
set $fastcgi_script_name2 $1;
38-
set $path_info $2;
39-
}
40-
fastcgi_param PATH_INFO $path_info;
41-
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name2;
42-
fastcgi_param SCRIPT_NAME $fastcgi_script_name2;
16+
include fastcgi.conf;
4317
}
4418
}

0 commit comments

Comments
 (0)