Comments on Installing Laravel PHP Framework on Ubuntu 16.04 for Apache
Laravel is a very popular open source PHP framework aimed at easy development of applications. If you are looking for a new PHP framework to try, you should give Laravel a try. The following guide will allow you to run Laravel on an Ubuntu 16.04 based Apache server.
48 Comment(s)
Comments
You got me with this:
sudo composer create-project laravel/laravel your-project --prefer-dist
So after we have to do:
sudo chgrp -R www-data /var/www/html/your-projectsudo chmod -R 775 /var/www/html/your-project/storage
(where is your-project is some project name)
Also here:
<VirtualHost *:80> ServerName localhost ServerAdmin webmaster@localhost DocumentRoot /var/www/html/your-project/public <Directory /var/www/html/your-project> AllowOverride All </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined</VirtualHost>Because project will never start...But any way, thank you guys for great tutorial ;)Best tutorial so far. Congrats!
very useful. Thanks.
Best explanation I've ever encountered! Thnx,
thanks , very simple and useful.
perfect!!! everything has been in order !!! thanks
i've been trying to install for last 2 days.
This is the only tutorial I've been able to use to install laravel succcessfully. Thanks a lot!
Very usefull...Thanks
Your configure apache section worked perfectly to solve my problem.
Everything worked like cham!!. Great post and Thanks
Awesome tutorial
after running
sudo apt-get install apache2 libapache2-mod-php5
this shows up:
The following packages have unmet dependencies:
libapache2-mod-php5: Depends: apache2-api-20120211 but it is not installable
Depends: apache2(>= 2.4)
E: Unable to correct problems, you have held broken packages.
I really dont know how to move forward from this
run:
apt-get update
and then try the failed command again.
hi people,
after i follow this tutorial, in the end give me on error
* Restarting web server apache2 [fail] * The apache2 configtest failed.Output of config test was:AH00526: Syntax error on line 2 of /etc/apache2/sites-enabled/laravel.conf:Invalid command '\xc2\xa0\xc2\xa0', perhaps misspelled or defined by a module not included in the server configurationAction 'configtest' failed.
i do this
sudo chgrp -R www-data /var/www/html/extremesudo chmod -R 775 /var/www/html/extreme/storage
this is i have in laravel.conf
<VirtualHost *:80> ServerName localhost ServerAdmin webmaster@localhost DocumentRoot /var/www/html/extreme/public <Directory /var/www/html/extreme> AllowOverride All </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
what i do wrong?
Really clear and detailed instructions.Can't thank you enough ! :D
Followed all instructions but hit one problem at the end. /localhost/index creates a Laravel routes error but /localhost/index.php runs fine.
I'm running Ubuntu 16.04 LTS and php7. Laravel version is 5.3.9.
The biggest problems with Laravel are the subtle changes from release to release which means each release requires a different installation stragety. :/
Best tutorial. It works like a charm!
Hi! I have tried to install the laravel..but when I type this command "sudo composer create-project laravel/laravel your-project --prefer-dist" I get the following error: [Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: fai led to open stream: Connection timed out ......Somebody help...I will so much appreciate thanks
How to install laravel 5.3 on ubuntu ?
Thank you!
Versions of php and Apache are no more supported in Ubuntu.
Solution :
sudo apt install apache2 php7.0 libapache2-mod-php7.0 php7.0-mysql php7.0-curl php7.0-gd php7.0-intl php-pear php-imagick php7.0-imap php7.0-mcrypt php-memcache php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl php7.0-mbstring php-gettextI got all the things done accordding to this tutorial and without any error but going to localhost, it shows completely blank screen. so, i don't know whether laravel is working fine or not.
I am new to laravel. Can anyone suggest me what to do?
Any help will be highly apprecciated.
How can I run two websites (main domain website mainwebsite.com in HTML, mainwebsite.com/laravel-project ). How can I make sure that both websites are running after disabling default config? How to take care of that?
Thanks in advance!
Step: 'composer install' is missing
Thank you. Worked like a charm
sudo add-apt-respository ppa:ondrej/php5 ---> sudo add-apt-repository ppa:ondrej/php5
after run :
sudo composer create-project laravel/laravel your-project --prefer-dist
i got "Do not run Composer as root/super user! See https://getcomposer.org/root for details"
what could go wrong ?
sudo add-apt-repository ppa:ondrej/php5'This PPA does not support trusty'Cannot add PPA: ''This PPA does not support trusty''.
Please help me..
how to restart server after closing system and using that again.
Thanks! This works great! :)
Thanks, this tutorial really works.
Best tutorial... Congrats. I've been searching for tutorial on website and I always get orror on instalation. And now I found your website. Ta da.. everything gonna be allright
Great!I change one thing:
chgrp -R www-data /var/www/html/project
for:chown -R www-data:www-data /var/www/html/projectGive all permissions to web service
Thanks a lot bhai..
Thank you, man!
Thanks.
sudo add-apt-respository ppa:ondrej/php5 please replce this command line because you have misspelled repository
Nice article, thank you!
An easy way to try out Laravel in action is to use Laravel 5 Boilerplate / Starter Kit - https://github.com/Labs64/laravel-boilerplate
This is also offering Docker container, with this you don’t need a local PHP (composer, node.js, etc.) environment and can start to evaluate Laravel right away.
the best tutorial for laravel installation , please update with php7 version too.
Thanks
I only needed the apache configuration and it worked perfectly on Debian Stretch, thanks a lot!
Good !
I am successfully instald laravel for thanks.
Running sudo chgrp -R www-data /var/www/html/project command just messed up my entire linux, now my sudo command doesn't work.
The command is fine, it can not mess up your Linux when typed in correctly. Most likely, you added a whitespace somewhere in the path.
Why on earth you give ownership to the whole filesystem of your web project to apache user? you don't really need it and it opens the project to any kind of defacement if you have a small bug or any uncontrolled upload feature in your application
How do I know what IP my server is on? Tried localhost, but that only gives my apache install info.
I follow the step but it didn`t work what goes wrong
<VirtualHost *:80>
ServerName mylaravel.test
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/mylaravel/public
<Directory /var/www/html/mylaravel>
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
this is my laravel.conf
someone help me thanks
Nice... this is my favorite tutorial
Great tutorial Very useful