在server节点下添加
server {
listen ;
server_name default;
#index index.php;
# 目录浏览功能
autoindex on;
# 显示文件大小统计
autoindex_exact_size off; root /mnt/hgfs/dev; location ~ \.php(.*)$ {
add_header 'Access-Control-Allow-Origin' '*';
fastcgi_pass 127.0.0.1:;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $;
include fastcgi_params;
}
}