-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfiguração servidor web Laravel.txt
More file actions
78 lines (46 loc) · 1.69 KB
/
Configuração servidor web Laravel.txt
File metadata and controls
78 lines (46 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
sudo apt-get install unzip
——- Instalação do Apache ———-
sudo apt-get install apache2
———- Instalação do PHP 7.0 ———
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.0
———- Módulo do PHP ———
sudo apt-cache search php7-*
sudo apt-get install php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.1-mcrypt
———- Requisitos do Laravel ———
sudo apt-get install openssl ssl-cert
sudo apt-get install php7.1-mbstring
sudo apt-get install php-xml
——- Instalação do Mysql ———-
sudo apt-get install mysql-server
——- Instalação do Composer ———-
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
——- Criação do projeto ———-
composer create-project --prefer-dist laravel/laravel blog
——- configuração do projeto ———-
sudo chgrp -R www-data /var/www/html/blog
sudo chmod -R 775 /var/www/html/blog/storage
——- configuração do Apache ———-
cd /etc/apache2/sites-available
sudo nano laravel.conf
<VirtualHost *:80>
ServerName localhost
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/blog/public
<Directory /var/www/html/blog>
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
sudo a2dissite 000-default.conf
sudo a2ensite laravel.conf
sudo a2enmod rewrite
sudo service apache2 restart
——- Caso ocorra algum problema ———-
Error in exception handler
php artisan cache:clear
chmod -R 777 app/storage
composer dump-autoload