3 Kasım 2018 Cumartesi

Cloud 9, Laravel setup and configuration

Hi everyone,

First just create workspace on Cloud 9 for Laravel project. Then we will start.

-Now go to the Terminal and download laravel project with below command.
composer create-project --prefer-dist laravel/laravel blog "5.5.*"
"blog" is your temp project directory, don't worry about this we will change root directory.

Write bellow command step by step

1-) shopt -s dotglob
2-) mv blog/* ./ 
3-) rm -rf blog

Well done,
Step 2 is copying all file in "blog" directory to root directory,
Step 3 is just remove "blog" folder.

Then now we need to modify the apache config beacuse Lavarel is serving its content from the public directory.

Write bellow comment for to open cloud 9 config,

sudo nano /etc/apache2/sites-enabled/001-cloud9.conf

Now you can see "001-cloud9.conf"
Find this "DocumentRoot /home/ubuntu/workspace"
Change like this "DocumentRoot /home/ubuntu/workspace/public"

if you can correctly the last step is To save the file press F2, then ‘Y’ and ‘Enter’.

Best regards.