while trying to upload a .Net 5 project to AWS beanstalk, we are getting an error that the provided directive is unknown. We tried to follow the AWS documentation for the custom conf folder structure and naming. (screenshot below).
The deployment fails and in eb-engine.log, following error is listed:
2022/07/03 20:22:13.936014 [ERROR] An error occurred during execution of command [app-deploy] - [FlipProxyForDotNetCore]. Stop running the command.
Error: copy proxy conf from staging failed with error validate nginx configuration failed with error Command /bin/sh -c /usr/sbin/nginx -t -c /var/proxy/staging/nginx/nginx.conf failed with error exit status 1.
Stderr:nginx: [emerg] unknown directive "client_max_body_size" in /var/proxy/staging/nginx/conf.d/myconf.conf:1 nginx: configuration file /var/proxy/staging/nginx/nginx.conf test failed
if possible kindly what am doing wrong