【发布时间】:2020-11-03 11:38:20
【问题描述】:
我正在开发一个 Spring Boot 项目,我正在尝试将一个文件添加到 S3 中,该文件在本地运行良好,但是当我在 beanstalk 服务器上执行此操作时,它无法正常工作。我研究了它,发现我们可以在我们的文件中添加 .extensions 并添加一些配置文件,但它仍然对我不起作用。我在 .ebextensions/01_files.config 中有一个文件 我试过这个:-
files:
"/etc/nginx/conf.d/proxy.conf" :
mode: "000755"
owner: root
group: root
content: |
http {
client_max_body_size 2000M;
}
我试过了
files:
"/etc/nginx/conf.d/proxy.conf" :
mode: "000755"
owner: root
group: root
content: |
client_max_body_size 2000M;
我试过了
container_commands:
01_reload_nginx:
command: "service nginx reload"
files:
"/etc/nginx/conf.d/proxy.conf":
mode: "000755"
owner: root
group: root
content: |
client_max_body_size 2000M;
但他们都没有工作 我也在 .ebextensions/nginx/conf.d 中有一个文件 这是proxy.conf,其中包含
client_max_body_size 2000M;
我的应用程序属性如下所示:
# ============ MULTIPART ==================
# Enable multipart uploads
spring.servlet.multipart.enabled=true
# Threshold after which files are written to disk.
spring.servlet.multipart.file-size-threshold=5MB
# Max file size.
spring.servlet.multipart.max-file-size=2000MB
# Max Request Size
spring.servlet.multipart.max-request-size=2000MB
spring.http.multipart.max-file-size=2000MB
spring.http.multipart.max-request-size=2000MB
upload_max_filesize=2000M
post_max_size=2000M
【问题讨论】:
标签: java spring-boot nginx amazon-elastic-beanstalk nginx-reverse-proxy