您好,登錄后才能下訂單哦!
準備工作
composer 更換國內(nèi)源
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/
免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內(nèi)容。