1.添加php及nginx软件源

curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg
sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
curl -sSLo /usr/share/keyrings/deb.sury.org-nginx.gpg https://packages.sury.org/nginx/apt.gpg
sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-nginx.gpg] https://packages.sury.org/nginx/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/nginx.list'
apt-get update

2.安装php及sqlite3

apt install php7.4 php7.4-fpm php7.4-sqlite3 php7.3-mbstring php7.4-curl sqlite3

我的Nginx.conf备份

user www-data;
worker_processes auto;
worker_cpu_affinity auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
        worker_connections 76800;
        multi_accept on;
  use epoll;
}

http {

        ##
        # Basic Settings
        ##

        sendfile on;
        tcp_nopush on;
        types_hash_max_size 20480;
        # server_tokens off;
  
        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;
  client_header_buffer_size 32k;
  large_client_header_buffers 4 32k;
  client_max_body_size 10240m;
  client_body_buffer_size 100m;
        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        ##
        # SSL Settings
        ##

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
        ssl_prefer_server_ciphers on;

        ##
        # Logging Settings
        ##

        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;

        ##
        # Gzip Settings
        ##

        gzip on;

        # gzip_vary on;
        # gzip_proxied any;
        # gzip_comp_level 6;
        # gzip_buffers 16 8k;
        # gzip_http_version 1.1;
        # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

        ##
        # Virtual Host Configs
        ##

        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
}


#mail {
#        # See sample authentication script at:
#        # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
#        # auth_http localhost/auth.php;
#        # pop3_capabilities "TOP" "USER";
#        # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
#        server {
#                listen     localhost:110;
#                protocol   pop3;
#                proxy      on;
#        }
#
#        server {
#                listen     localhost:143;
#                protocol   imap;
#                proxy      on;
#        }
#}
server {
    listen 80;
    listen [::]:80;
    listen 31011;
    listen [::]:31011;
    server_name name2;
    root /filerun/filerun/;
    index index.php index.html;

    location / {
        try_files $uri $uri/ /index.php;
    }

    location ~ [^/]\.php(/|$) {
        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
        if (!-f $document_root$fastcgi_script_name) {
            return 404;
        }


        include fastcgi_params;
        # include snippets/fastcgi-php.conf;

        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_pass unix:/run/php/php7.4-fpm.sock;
    }

    # A long browser cache lifetime can speed up repeat visits to your page
    location ~* \.(jpg|jpeg|gif|png|webp|svg|woff|woff2|ttf|css|js|ico|xml)$ {
        access_log off;
        log_not_found off;
        expires 360d;
    }

    # disable access to hidden files
    location ~ /\.ht {
        access_log off;
        log_not_found off;
        deny all;
    }
    

}

server{
    listen 80;
    listen [::]:80;
    server_name name1;
    location /
    {
        # auth_basic "authentication";
        auth_basic_user_file /etc/nginx/httpd;
        client_max_body_size 10G;
        root /filerun/filerun/userfiles;
        dav_access user:rw group:rw all:rw;
        index index.html index.htm;
        autoindex on;
        autoindex_localtime on;
        client_body_temp_path /tmp;
         
        # ngx_http_dav_module 模块支持
        dav_methods PUT DELETE MKCOL COPY MOVE;
        create_full_put_path on;
        # nginx-dav-ext-module 模块支持
        dav_ext_methods PROPFIND OPTIONS LOCK UNLOCK;   
    }
}