laragon配置fastadmin伪静态

server {
    listen 80;
    server_name fastadmin.test *.fastadmin.test;
    root "C:/laragon/www/fastadmin/public/";
    
    index index.html index.htm index.php;
 
    location / {
         try_files $uri $uri/ /index.php$is_args$args;
         index index.php index.html index.htm;
         if (!-e $request_filename) {
         rewrite ^/(.*)$ /index.php/$1 last;
         }
    }

    location ~ ^(.+\.php)(.*)$ {
    fastcgi_pass php_upstream;
        fastcgi_split_path_info ^(.+\.php)(.*)$;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
        include fastcgi_params;
    }
    
    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass php_upstream;		
        #fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    }
	
	
    charset utf-8;
	
    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }
    location ~ /\.ht {
        deny all;
    }
}
上一篇:nginx-php-mysql


下一篇:li里的a标签浮动了,为什么li本身也浮动了?