https://luerangler-dev.tistory.com/69
위 진행 후
// 컴포저 설치
1. cd /tmp
2. curl -sS https://getcomposer.org/installer | php
3. sudo mv composer.phar /usr/local/bin/composer
// 라라벨 프로잭트 생성 및 설정
4. cd /var/www/html
5. sudo composer create-project laravel/laravel test
6. sudo chgrp -R www-data /var/www/html/test
7. sudo chmod -R 775 /var/www/html/test/storage
8. cd /etc/apache2/sites-available
9. vi laravel.conf
<VirtualHost *:80>
ServerName test
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/test/public
<Directory /var/www/html/test>
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
입력 후 저장
10. sudo a2dissite 000-default.conf && sudo a2ensite laravel.conf && sudo a2enmod rewrite
11. sudo service apache2 restart
'개발이야기 > PHP' 카테고리의 다른 글
PHP 핸드폰 번호 자르기 (0) | 2020.03.17 |
---|