fastadmin Nginx/Apache伪静态配置

Nginx:

image.png

第6行 root /www/wwwroot/.../public;
改为 set $root /www/wwwroot/站点域名/public;root $root;

include /www/server/panel/vhost/rewrite/xxx.conf;前面加上#号注释掉
在access_log前插入

location / {
        root $root;
        index    index.html index.php;
        if ( -f $request_filename) {
            break;
        }
        if ( !-e $request_filename) {
            rewrite ^(.*)$ /index.php/$1 last;
            break;
        }
    }
     location ~ .+\.php($|/) {
        fastcgi_pass    unix:/run/php/php7.0-fpm.sock;
        fastcgi_split_path_info ^((?U).+.php)(/?.+)$;
        fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
        fastcgi_param    SCRIPT_FILENAME    $root$fastcgi_script_name;
        include        fastcgi_params;
    }

Apache:


 RewriteEngine on
 RewriteBase /
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteRule ^(.*)$ index.php?s=/$1 [QSA,PT,L]

你可能感兴趣的:(fastadmin Nginx/Apache伪静态配置)