ฉันคือ AWS ใหม่ ฉันได้สร้างอินสแตนซ์ EC2 Amazon Linux แล้ว ฉันใช้ CodeDeploy เพื่อปรับใช้โดยตรงจาก GitHub
จนถึงตอนนี้ก็ประสบความสำเร็จ ฉันได้ติดตั้ง httpd php56 บนอินสแตนซ์ EC2 Linux แล้ว ปรับใช้โค้ดจาก git สำเร็จ
เฟรมเวิร์ก PHP ที่ฉันใช้คือ CodeIgniter 2
บนเครื่องท้องถิ่น ฉันสามารถเรียกใช้แอปพลิเคชันได้ดี
ใน EC2 index.php ในรูทแสดงเป็นค่าว่าง... ฉันคิดว่า htaccess ล้มเหลวหรือการกำหนดค่าอื่นไม่ถูกต้อง
ฉันได้เพิ่ม info.php ลงในโฟลเดอร์รูทและสามารถดำเนินการได้โดยไม่มีปัญหาใดๆ ดังนั้นมันไม่ใช่ปัญหาของ PHP
นี่คือ httpd.conf
# Further relax access to the default document root:
<Directory "/var/www/html">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
บน localhost ฉันสังเกตเห็น /assets/ return 403 ซึ่งเป็นสิ่งที่ฉันต้องการ อย่างไรก็ตามใน EC2 /assets/ ส่งคืนรายการไดเรกทอรีซึ่งไม่ใช่สิ่งที่ฉันต้องการ
หวังว่านั่นจะช่วยให้มีความคิดเกี่ยวกับสิ่งที่อาจเป็นปัญหา
ไม่แน่ใจว่าจะดูอะไรอีก
ขอบคุณล่วงหน้า,
ริค