989 B
989 B
layout | wiki | date | categories | title | description | |
---|---|---|---|---|---|---|
wiki | laravel | 2023-12-15 15:58 |
|
环境配置 | 项目环境配置简要说明 |
环境
{%radio checked:true php 7.4%} {%radio checked:true laravel 8.x%}
php artisan --version
# Laravel Framework 8.83.27
php -v
# PHP 7.4.27 (cli) (built: Dec 16 2021 22:42:18) ( NTS )
创建项目
拉取项目源码
composer create-project laravel/laravel="^8" demo
配置nginx
server {
listen 80;
server_name demo.cn; # 自行更改
root /www/source_analysis/public/; # 根目录
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ [^/]\.php(/|$) {
fastcgi_pass php:9000;
include fastcgi-php.conf;
include fastcgi_params;
}
}
修改host文件
修改hosts文件,将域名映射到本机ip
127.0.0.1 demo.cn