Laravel 설치하기

Laravel 설치하기

# nginx 설정
sudo vim /etc/nginx/sites-available/default
sudo service nginx reload

# laravel 설치
composer create-project laravel/laravel test

# laravel 설정
cd test
sudo chown www-data storage/ -R
vim .env

server {
        listen 80;
        root /var/www/test/public;
        index index.php;
        server_name _;
        charset utf-8;
        location = /favicon.ico {
                access_log off;
                log_not_found off;
        }
        location = /robots.txt {
                access_log off;
                log_not_found off;
        }
        location / {
                try_files $uri $uri/ /index.php?$query_string;
        }
        location ~ /\. {
                deny all;
        }
        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/run/php/php8.1-fpm.sock;
        }
}

참고) https://laravel.kr/docs/9.x/installation

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다