在本地部署到 tomcat 时,我对 server.xml 进行了此更改(如下),有没有一种方法可以将其提供给 Elastic Beanstalk?
<Connector connectionTimeout="20000" port="8080"
protocol="org.apache.coyote.http11.Http11NioProtocol"
redirectPort="8443"/>'
谢谢 '
最佳答案
您现在无需提供自定义 AMI 即可执行此操作。按照以下说明进行操作:http://aws.typepad.com/aws/2012/10/customize-elastic-beanstalk-using-configuration-files.html
为了提供自定义服务器 xml 在 webapp 中创建 .ebextensions 文件夹,将自定义 server.xml 文件放在那里并添加一个文件:server-update.config内容:
container_commands:
replace-config:
command: cp .ebextensions/server.xml /etc/tomcat7/server.xml
关于java - 如何为弹性 beanstalk tomcat 提供配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12264432/