nginx ci
ci 的nginx 配置
server {
listen 80;
server_name you.service.name
error_log /path/to/log;
access_log /path/to/log;
location / {
root /path/to/file
index index.php index.html index.htm;
if (-f $request_filename) {
expires max;
break;
}
#if (!-e $request_filename) {
# rewrite ^/(.*)$ /index.php/$1 last;
#}
if ($request_filename !~ (js|css|images|robots/.txt|index/.php.*) ) {
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
}
location ~ \.php($|/) {
root /path/to/file
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_split_path_info ^(.+\.php)(.*)$;
include fastcgi_params;
}
}