Good evening, this is Bono.
This is a summary of what we did when we built a website on AWS, which was created using cakePHP on localhost.
コンテンツ
Basically, you can copy and paste.
If you had created an application in a folder like the following,
/var/www/localhost/cake_app/
Copy the entire cake_app directory.
scp -i ~/.ssh/XXX -r cake_app ec2-user@XX.XX.XX.XX:
First, basic httpd.conf
Set RootDirectory, ServerRoot in this.
Location: /var/www/html/hoge
Then a little setup.
cakePHP uses mod_rewrite functionality, which converts URLs.
Therefore, the phrase RewriteBase must be added in the .htaccess file.
The following site was helpful.
As a reminder, there are three .htaccess files, and each must have this description appropriately.
Failure to do so will result in an Internal Server Error.
- /var/www/html/hoge/.htaccess : /
- /var/www/html/hoge/app/.htaccess : /app
- /var/www/html/hoge/app/webroot/ : /app/webroot
"500 Internal Server Error" AIDREAM at [CakePHP] Sakura
Don't forget to set permissions.
cd /var/www/html/tmp
chmod 777
CakePHP Installation Continued (mod_rewrite Configuration) - Web App Development on Mac OS X v10.5
Apache Configuration
Turn on KeepAlive.
/etc/httpd/conf/httpd.con
KeepAlive On
PHP Configuration
Japanese settings, etc.
/etc/php.ini
Building a CakePHP environment on an EC2 Amazon Linux instance - hrendoh's Diary
AllowOverride settings
Set AllowOverride at the end of httpd.conf.
Building a CakePHP2 environment on an AWS EC2 instance - Hearts and Bones
Installing PDO
If you get an error about PDO, you need to install PDO, apparently.
yum install php-mysql
Here is the configuration, they need some settings for extension.