admin
admin copied to clipboard
上传文件接口一直报500错误
上传文件接口一直报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;
}
}
权限问题吧,,,