【发布时间】:2021-04-03 11:53:09
【问题描述】:
我的文件上传有问题。我使用表单上传图像,如果我检查文件夹,我可以看到它并且一切似乎都正确:
时间戳为 10:44 的所有文件都来自 git clone。 10:55 创建的文件来自表单。我可以使用正确的 URL 访问所有这些,除了 10:55 的那个,不管我做什么都会给我一个 404 错误。
更多信息:一切都在 Digital Ocean 中,带有 docker,我显示的文件夹是提供文件的文件夹。
另外,这是我的 nginx 配置,以防万一:
server {
listen 80;
index index.php index.html;
root /var/www/public;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# set client body size to 16M #
client_max_body_size 16M;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass app:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
} }
我尝试了很多东西,但没有办法。任何想法?谢谢!
【问题讨论】:
标签: laravel docker nginx http-status-code-404