aws lightsail missconfiguration |
-
alex-cross Newbie

-
Posts: 2
Threads: 1
Joined: Jul 2020
Reputation:
0
(07-17-2020, 12:23 AM)tgix Wrote: Thanks for giving me the opportunity to try LightSail, been using AWS for many many years, but haven't tried LightSail. Without you giving much information about you setup I created a CI4 lightsail instance in 5 minutes following these steps:
Platform: Linux/Unix
Blueprint: OS Only / Amazon Linux
Instance type: 1GB RAM instance
SSH to the host and then follow the instructions from AWS, just Step 1 is OK for this test:
https://docs.aws.amazon.com/AWSEC2/lates...-LAMP.html
(skip point 6 on lightsail since the instance is wide-open anyway)
Install CI4 dependencies:
Code: sudo yum install php72-intl php72-mbstring
Reboot instance.
Test IP address in browser to see the Apache Test Page.
SSH back in to host and create directory for CI4:
Code: sudo mkdir -p /var/www/ci4
sudo chown ec2-user.ec2-user /var/www/ci4/
****** I DO NOT USE COMPOSER *******
****** Follow the next lines to a ********
****** manual installation ********
Code: wget https://github.com/codeigniter4/framework/archive/v4.0.4.zip
Code: mv framework-4.0.4/* ./
rm -rf framework-4.0.4
**** the next steps is if you want to install via composer ***
Install composer in /home/ec2-user:
Copy code for the composer installer from https://getcomposer.org/download/ and paste that into SSH.
Install CI4 appstarter:
Code: cd /var/www/ci4
~/composer.phar create-project --no-dev codeigniter4/appstarter test
***** finish composer installation **********
Change into the CI4 directory:
Code: cd /var/www/ci4/test
Change permissions for writeable:
Code: chmod -R 777 /var/www/ci4/test/writable/
Configure the env file by setting CI_ENVIRONMENT and app.baseURL
Modifications to .env:
Code: #--------------------------------------------------------------------
# ENVIRONMENT
#--------------------------------------------------------------------
CI_ENVIRONMENT = production
#--------------------------------------------------------------------
# APP
#--------------------------------------------------------------------
app.baseURL = 'http://x.y.z.w'
Edit apache config and change DocumentRoot to the appstarter directory:
Code: sudo nano /etc/httpd/conf/httpd.conf
Change line with DocumentRoot to:
Code: DocumentRoot "/var/www/ci4/test/public"
Restart apache:
Code: sudo /etc/init.d/httpd restart
Go to IP-address to see CI4's welcome page.
|
Messages In This Thread |
RE: aws lightsail missconfiguration - by alex-cross - 07-17-2020, 07:25 PM
|