Amazon web services 如何为我的Elastic Beanstalk应用程序添加自定义404页面
我已经设置了一个php elastic beanstalk应用程序,如果出现404错误,我希望它使用我的自定义404.html页面。我的代理服务器设置为apache。通常我只在.htaccess文件或apache配置文件中定义这一行:ErrorDocument 404/404.php。我已尝试将以下内容放入.ebextensions目录中的apache.config中:Amazon web services 如何为我的Elastic Beanstalk应用程序添加自定义404页面,amazon-web-services,apache,amazon-elastic-beanstalk,Amazon Web Services,Apache,Amazon Elastic Beanstalk,我已经设置了一个php elastic beanstalk应用程序,如果出现404错误,我希望它使用我的自定义404.html页面。我的代理服务器设置为apache。通常我只在.htaccess文件或apache配置文件中定义这一行:ErrorDocument 404/404.php。我已尝试将以下内容放入.ebextensions目录中的apache.config中: files: "/etc/httpd/conf.d/update.conf": mode: &
files:
"/etc/httpd/conf.d/update.conf":
mode: "000644"
owner: root
group: root
encoding: plain
content: |
ErrorDocument 404 /404.html
这似乎没什么作用。如果有人能提供建议,请让我知道。您能将ssh连接到EB实例并手动添加吗?。这是为了让你知道什么需要自动完成。一旦您可以手动使其工作,那么您可能会担心如何使用eExtensions复制它。@Marcin我可以手动添加它,并且成功了。我就是不知道如何在ebextensions中复制它