Please help me with laravel configuration for making it work with apache
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
You should be able to install a Laravel app just like any other website. See How To Set Up Apache Virtual Hosts on Ubuntu 14.04 LTS.
You’ll need to install a couple of PHP extensions that Laravel needs:
sudo apt-get install php5-mcrypt php5-json
sudo php5enmod mcrypt
sudo php5enmod json
sudo service apache2 restart
The rewrite module should be enabled by default, but if your routes aren’t working properly, try enabling it:
sudo a2enmod rewrite
sudo service apache2 restart
Finally, you need to grant Laravel write permissions to the app/storage directory:
sudo chown -R www-data:www-data /var/www/domain1.com/app/storage
For users of the Ubuntu LAMP 1-Click droplets, to this I would also add something I figured out the hard way: Often Laravel setups will have the app located in something like /var/www/laravelapp with the public folder at /var/www/laravelapp/public The Laravel documentation points out the need to edit your apache2 sites-enabled configuration to change the DocumentRoot to /var/www/laravelapp/public
You must also change the <Directory> for the .htaccess rules to match! Otherwise even after you enabled mod_rewrite, your .htaccess in /var/www/laravelapp/public will be ignored, and nothing but your home page will load.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.