如何在亚马逊 EC2 中编辑 httpd.conf 文件
codeigniter .htaccess 在亚马逊 ec2 中删除 index.php 不起作用
当我阅读上述问题时,我意识到我的问题与他们相同。因此,我应该更改我的 Amazon EC2 实例中的 httpd.conf 文件,以使我的 htaccess 文件正常工作。
我通过 ssh 客户端连接到我的实例,它是 Linux 终端,我执行下面的代码。
sudo nano /etc/httpd/conf/httpd.conf
此代码的结果我看到了页面:
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so 'log/access_log'
# with ServerRoot set to '/www' will be interpreted by the
# server as '/www/log/access_log', where as '/log/access_log' will be
# interpreted as '/log/access_log'.
#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
所以,我不知道看到这个后我该怎么办。我将在哪里将 AllowOverRide None 更改为 AllowOverRide All,因为我看不到这样的任何东西。
在将 AllowOverRide None 更改为 AllowOverRide All 之后,我是否应该使用任何命令重新启动服务器。