Thinkphp框架的网站lnmp无法页面跳转配置
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;
}
}
本文标题:Thinkphp框架的网站lnmp无法页面跳转配置
网页网址:http://ybzwz.com/article/jgpipp.html