sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install libapache2-mod-php7.1
sudo a2dismod php5
sudo a2enmod php7.1
sudo apt-get install php7.1-dom php7.1-mbstring php7.1-zip php7.1-gd php7.1-xml php7.1-gmp php7.1-mysql php7.1-sqlite php7.1-mcrypt php7.1-curl
sudo apt-get install php7.1-mysql
sudo apt-get install php7.1-sqlite
sudo composer global require 'laravel/installer'
export PATH=~/.composer/vendor/bin:$PATH
laravel new laravel
sudo chown -R $USER $HOME/.composer
sudo nano /etc/apache2/sites-enabled/001-cloud9.conf
Thanks to @AidHamza for correctly
<VirtualHost *:8080>
DocumentRoot /home/ubuntu/workspace/public
ServerName https://${C9_HOSTNAME}:443
LogLevel info
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /home/ubuntu/workspace>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
ServerName https://${C9_HOSTNAME}
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Login to Mysql :
mysql-ctl cli
Then
CREATE DATABASE laravel DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
GRANT ALL ON laravel.* TO 'laraveluser'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
Please edit AppServiceProvider.php on app/Providers
use Illuminate\Support\Facades\Schema;
public function boot()
{
Schema::defaultStringLength(191);
}
Using this link : https://m.do.co/c/70b5b463c03f
Thanks @nakamuraagatha, In Apache vhost
/etc/apache2/sites-enabled/001-cloud9.conf
we need to point to Laravelpublic
dir or rely on.htaccess