php realpath(__DIR__) chdir(): open_basedir restriction in effect. File(/home/alpha/alpha_images/) is not within the allowed path(s):
需要在nginx配置里面加上 fastcgi_param PHP_ADMIN_VALUE "open_basedir=/home/alpha/alpha_api_p:/tmp/:/proc/:/home/alpha/alpha_images/";
server
{
listen 80;
server_name cc.com
index index.html index.htm index.php default.html default.htm default.php;
root /home/alpha/alpha_api_p/public/;
location ~ [^/]\.php(/|$)
{
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/home/alpha/alpha_api_p:/tmp/:/proc/:/home/alpha/alpha_images/";
include fastcgi.conf;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
if ($time_iso8601 ~ "^(\d{4})-(\d{2})-(\d{2})") {
set $year $1;
set $month $2;
set $day $3;
}
}