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,
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.
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
Don't forget to set permissions.
cd /var/www/html/tmp chmod 777
Turn on KeepAlive.
/etc/httpd/conf/httpd.con KeepAlive On
Japanese settings, etc.
Set AllowOverride at the end of httpd.conf.
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.