您好,登錄后才能下訂單哦!
nginx配置文件修改如下:
server {
listen 80;
server_name debian;
root /usr/share/nginx/html;
index index.php;
location ~ ^/(api)\.php$ {
deny all;
}
location / {
if (!-e $request_filename){
rewrite ^/(.*)$ /index.php/$1 last;
}
}
location ~ \.php($|/){
set $script $uri;
set $path_info "";
if ($uri ~ "^(.+?\.php)(/.+)$") {
set $script $1;
set $path_info $2;
}
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $path_info;
include fastcgi_params;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
expires 1d;
}
location ~ .*\.(js|css)?$ {
expires 12h;
}
}
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。