wsl子系统无法上传文件?

nginx,php啥的都配置好了,就是不能上传文件,服了

user xie;
worker_processes 1;
pid /run/nginx.pid;
#include /etc/nginx/modules-enabled/*.conf;

events {
    worker_connections 100;
    multi_accept on;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    server_names_hash_bucket_size 512;
    client_header_buffer_size 32k;
    large_client_header_buffers 4 32k;
    client_max_body_size 500m;
    sendfile        on;
    tcp_nopush      on;
    tcp_nodelay     on;
    keepalive_timeout  10;
    fastcgi_connect_timeout 300;
    fastcgi_send_timeout 300;
    fastcgi_read_timeout 300;
    fastcgi_buffer_size 64k;
    fastcgi_buffers 4 64k;
    fastcgi_busy_buffers_size 128k;
    fastcgi_temp_file_write_size 256k;
    fastcgi_intercept_errors on;
    gzip  on;
    gzip_min_length  1k;
    gzip_buffers     4 16k;
    gzip_http_version 1.1;
    gzip_comp_level 2;
    gzip_types     text/plain application/javascript application/x-javascript text/javascript text/css application/xml;
    gzip_vary on;
    gzip_proxied   expired no-cache no-store private auth;
    gzip_disable   "MSIE [1-6]\.";
    server_tokens off;
    access_log off;
    fastcgi_buffering off;

    server {
            listen 80;
            server_name  ~^(?<a>.+).a.com;
            root /mnt/d/www/$a/public;
            #rewrite ^(.*) https://$host$1 permanent;

            index index.html index.htm index.php app.php;
            autoindex on;
            location / {
                if (!-e $request_filename){
                    rewrite ^/(.*)$ /index.php/$1 last;
                }
            }
            location /spa {
                if (!-e $request_filename){
                    rewrite ^/(.*)$ /spa/index.html break;
                }
            }
            location ~ [^/]\.php(/|$) {
                try_files $uri =404;
                fastcgi_pass  unix:/run/php/php7.4-fpm.sock;
                fastcgi_index index.php;
                include /etc/nginx/fastcgi.conf;
                include /etc/nginx/pathinfo.conf;
            }
    }

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

wsl子系统无法上传文件?

wsl子系统无法上传文件?
试过ubuntu,debian,一直等待状态,其他接口可以,有遇到的吗?

《L01 基础入门》
我们将带你从零开发一个项目并部署到线上,本课程教授 Web 开发中专业、实用的技能,如 Git 工作流、Laravel Mix 前端工作流等。
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
讨论数量: 6

打开nginx access_log 和 error_log,看看报什么错再说

10个月前 评论
xieruidong521 (楼主) 10个月前
zhangrongwang (作者) 10个月前

上传文件接口报啥错呢

10个月前 评论
xieruidong521 (楼主) 10个月前
sanders

php-fpm 能响应了吗?

10个月前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!