基于 Laravel5 开发个人博客 - laravel开发系列教程(一)
准备工作
composer 更换国内源composer config -g repo.packagist composer https://packagist.phpcomposer.com
git
安装 laravel
composer create-project --prefer-dist laravel/laravel blog "5.5.*' //--prefer-dist
测试
php artisan serve // 该命令使用本地安装的PHP自带服务器 在浏览器访问 http://127.0.0.1:8000显示laravel 欢迎页表示安装成功
配置
1. public 目录 配置到nginx中#### blog-lara 配置server { listen 80; server_name crm.blog-lara.com; charset utf-8; #access_log logs/host.access.log main; root F:\blog\public; index index.php index.html; if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=/$1 last; break; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } location ~ \.php$ { fastcgi_pass fastcgi_backend; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; } }2. 配置文件
文档链接
composer 中国镜像: https://www.phpcomposer.com/
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。