Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Laravel on EC2 Instance

I'm brand new to AWS and this has got me stumped. I'm trying to install Laravel 4 on an instance I have on EC2 running the AMI Linux package. I don't have a domain for this, just using the free tier and trying it out.

Laravel needs to have the laravel/public folder as the document root but I can't work out how to do this. I've read loads of things about the conf.d folder vhosts file httpd.conf file and I don't really understand how it all fits together.

Can someone help me and tell me how I can set my documnent root so that when i visit my Elastic IP address it loads up correctly?

Thanks

like image 768
bencarter78 Avatar asked Jan 26 '26 19:01

bencarter78


1 Answers

If you want to access your laravel app by server ip you need to edit your httpd.conf file (usually in /etc/apache2 or /etc/httpd) and set the DocumentRoot option to the right directory.

DocumentRoot /var/www/laravel/public

and then restart apache

like image 91
Manuel Avatar answered Jan 28 '26 16:01

Manuel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!