Cloud9でhtaccessが効かない

なぜだか効かない

 

Apacheでhtaccessが効かない対処法【有効化手順】 | PisukeCode - Web開発まとめ

 

.htaccess】Options / DirectoryIndex ディレクティブ | Hazu Labo

 

$ httpd -V
Server version: Apache/2.4.54 (Amazon)
Server built: Jun 30 2022 11:28:47
Server's Module Magic Number: 20120211:124
Server loaded: APR 1.6.3, APR-UTIL 1.5.4, PCRE 8.21 2011-12-12
Compiled using: APR 1.6.3, APR-UTIL 1.5.4, PCRE 8.21 2011-12-12
Architecture: 64-bit
Server MPM: prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT=\"/etc/httpd\"
-D SUEXEC_BIN=\"/usr/sbin/suexec\"
-D DEFAULT_PIDLOG=\"/var/run/httpd/httpd.pid\"
-D DEFAULT_SCOREBOARD=\"logs/apache_runtime_status\"
-D DEFAULT_ERRORLOG=\"logs/error_log\"
-D AP_TYPES_CONFIG_FILE=\"conf/mime.types\"
-D SERVER_CONFIG_FILE=\"conf/httpd.conf\"
$ ll /etc/httpd/conf/httpd.conf
-rw-r--r-- 1 root root 11753 Aug 6 14:42 /etc/httpd/conf/httpd.conf
$ tail -2 /etc/httpd/conf/httpd.conf
# Load config files in the \"/etc/httpd/conf.d\" directory, if any.
IncludeOptional conf.d/*.conf
$ cat /etc/httpd/conf.d/custom_httpd.conf
# DocumentRootの変更 20220806追記
DocumentRoot \"/home/ec2-user/environment/xxxxxx/public\"

# .htaccessの有効化 20220806追記
<Directory /home/ec2-user/environment/xxxxxx/public>
AllowOverride All
Options -Indexes
</Directory>
$