在Beanstalk的配置文件中添加以下代码以将配置文件放在正确的目录中:
option_settings:
aws:elasticbeanstalk:container:nginx:
nginx.conf: |
error_log /var/log/nginx/error.log;
worker_processes 2;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
server {
listen 8080;
... // your server blocks go here
}
}
files:
"/etc/nginx/conf.d/elasticbeanstalk/myconf.conf":
mode: "000644"
owner: root
group: root
content: |
# my nginx conf
以上代码中,“myconf.conf”是你的nginx配置文件名。