admin icon indicating copy to clipboard operation
admin copied to clipboard

上传文件接口一直报500错误

Open Jeffryhui opened this issue 4 years ago • 1 comments

上传文件接口一直报500错误,配置的nginx按照文档来的。只是前端是用的yarn run watch

nginx配置

server {
    listen 80;
    server_name xxx.com;
    root /xxx/public;

    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Content-Type-Options "nosniff";
    error_log /usr/local/etc/nginx/logs/xx_error.log;
    access_log /usr/local/etc/nginx/logs/xx_access.log;
    index index.php index.html;

    charset utf-8;
    # yarn dev 或者 yarn watch 之后的路径
    location /admin-dev/ {
        try_files $uri $uri/ /admin-dev/index.html;
    }
    location /admin/ {
        try_files $uri $uri/ /admin/index.html;
    }

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

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }

    error_page 404 /index.php;
    location ~ \.php$ {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }
    location ~ /\.(?!well-known).* {
        deny all;
    }
}

Jeffryhui avatar Mar 12 '21 07:03 Jeffryhui

权限问题吧,,,

largezhou avatar Mar 12 '21 09:03 largezhou