标签:clu ram www stc cache fast string usr error
server {location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ ..(gif|jpg|jpeg|png|bmp|swf)$ {
add_header Access-Control-Allow-Origin ;
add_header Access-Control-Allow-Methods ‘GET, POST, OPTIONS‘;
add_header Access-Control-Allow-Headers ‘DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,lang,access-token‘;
if ($request_method = ‘OPTIONS‘){
return 204;}
}
location ~ \.php {
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods ‘GET, POST, OPTIONS‘;
add_header Access-Control-Allow-Headers ‘DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,lang,access-token‘;
if ($request_method = ‘OPTIONS‘) {
return 204;
}
fastcgi_pass 127.0.0.1:9000;
fastcgi_index /index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
error_log /usr/local/nginx/logs/error.files.ascotprime.com.log;
access_log /usr/local/nginx/logs/access.files.ascotprime.com.log;
}
标签:clu ram www stc cache fast string usr error
原文地址:https://blog.51cto.com/13293070/2432044