Skip to content

Instantly share code, notes, and snippets.

@jhowbhz
Last active January 17, 2019 18:29
Show Gist options
  • Save jhowbhz/1b37d5c76ed913e31b8cd2eab7de897a to your computer and use it in GitHub Desktop.
Save jhowbhz/1b37d5c76ed913e31b8cd2eab7de897a to your computer and use it in GitHub Desktop.
Detalhes de como instalar o LARAVEL ubuntu 16
# EXTENSÕES PHP
sudo apt install php7.2 libapache2-mod-php7.2 php7.2-mbstring php7.2-xmlrpc php7.2-soap php7.2-gd php7.2-xml php7.2-cli php7.2-zip
# INSTALANDO O COMPOSER UBUNTU 16+
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
#PERMISSÕES PASTA PROJETO
sudo chown -R www-data:www-data /var/www/html/MyProject/
sudo chmod -R 755 /var/www/html/MyProject/
# CONFIG PROJECT APACHE
sudo nano /etc/apache2/sites-available/laravel.conf
# CONFIGURAÇÃO DO APACHE "FOLDER PROJECT"
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/MyProject/public
ServerName example.com
<Directory /var/www/html/MyProject/public>
Options +FollowSymlinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
# APOS CONFIGURAR SALVAR E REINICIAR
sudo a2ensite laravel.conf
sudo a2enmod rewrite
sudo systemctl restart apache2.service
#DEPLOY ALTERANDO ARQUIVO APACHE CONF
-------------------------
nano /etc/apache2/apache2.conf
linha:
/var/www/
mude de
AllowOverride none
para
AllowOverride all
#HTACCESS NECESSÁRIO
#-----------------------
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !public/
RewriteRule (.*) /public/$1 [L]
</IfModule>
#PERMISSÕES PASTAS
#-----------------------
sudo chmod -R 777 storage
sudo chmod -R 777 bootstrap
composer update
composer require doctrine/dbal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment