不使用 .htaccess 的新 Elastic Beanstalk 实例 [英] New Elastic Beanstalk instance not using .htaccess

查看:23
本文介绍了不使用 .htaccess 的新 Elastic Beanstalk 实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一个以前从未遇到过的奇怪问题:我的新 Elastic Beanstalk 环境不尊重我的 .htaccess 文件.这很奇怪,因为我不记得这曾经是一个问题.事实上,我有一个旧的 EB 环境,是我多年前设置的,游戏代码很好.

I'm having a weird issue I've not encountered before: My new Elastic Beanstalk environment is not respecting my .htaccess files. It's odd because I don't recall this ever being a problem before. In fact I have an older EB environment that I set up years ago and it's fine with the game code.

这个新环境是 64 位 Amazon Linux 2.

This new environment is 64 bit Amazon Linux 2.

查看其他地方有指南说您需要编辑 /etc/httpd/conf/httpd.conf 文件,但我的 EC2 实例没有.(我也没有 /etc/apache2 目录.)它最接近的是 /etc/httpd/conf.d/php.conf 文件.

Looking elsewhere there are guides saying you need to edit your /etc/httpd/conf/httpd.conf file, but my EC2 instance doesn't have one. (I also don't have an /etc/apache2 directory.) The closest it has is a /etc/httpd/conf.d/php.conf file.

我不记得以前必须这样做,而且显然我有点担心如果我必须生成新实例,我的 EC2 实例会忘记对任何 .conf 文件的任何更改是在未来创建的.

I don't recall ever having to do this previously, and obviously I'm a bit concerned that my EC2 instance will forget any changes to any .conf files if I have to spawn new instances are created in the future.

你们如何让我的 EB/EC2 实例实现我的 .htaccess 文件?

How do you get my EB/EC2 instance to implement my .htaccess files?

推荐答案

另一个答案的更新,您现在可以通过更新配置中的代理服务器将版本 3+ 中的服务器更改为 apache.

An update to the other answer, you can now change the server in versions 3+ to apache by updating the proxy server in the configuration.

这篇关于不使用 .htaccess 的新 Elastic Beanstalk 实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆