ubuntu1804php安装

php及插件安装

apt install php-fpm php-mysql php-curl php-gd php-mbstring php-mcrypt php-xml php-xmlrpc php-zip php-opcache -y

 

server {                                                                                                                    
        listen 80;                                                                                                          
        listen [::]:80;                                                                                                     
                                                                                                                            
        server_name xxx.xxx.com;                                                                                      
                                                                                                                            
        root /var/www/html/xxx/;                                                                                            
                                                                                                                            
        location ~ \.php$ {                                                                                                 
                include snippets/fastcgi-php.conf;                                                                          
                                                                                                                            
                fastcgi_pass unix:/run/php/php7.2-fpm.sock;                                                                 
        }                                                                                                                   
} 

 nginx thinkphp伪静态设置

location / {
    if (!-e $request_filename){
        rewrite  ^(.*)$  /index.php?s=$1  last;   break;
    }
}

 

posted @ 2021-05-01 20:07  shiningrise  阅读(71)  评论(0编辑  收藏  举报