一鍵下載安裝
http://www.golaravel.com/download/
composer安裝
composer create-project laravel/laravel book --prefer-dist
服務器配置
- apaceh
- 配置httpd-conf:
php5_module
rewrite_module
listen監(jiān)聽端口
- 配置extra/httpd-vhost(虛擬主機,多站點):
端口
站點
域名
默認首頁
- 系統(tǒng)hosts文件: 將
域名
指向本地
- 重啟apache
- 修改文件權限:
storage
vendor
- nginx
- 配置nginx.conf文件:
端口
站點
域名
默認首頁
- FastCgi:
location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
} - 配置重寫規(guī)則
location ~ / {
try_files $uri $uri/ /index.php?query_string;
} - 系統(tǒng)hosts文件: 將
域名
指向本地
- 重啟apache
- 修改文件權限:
storage
vendor
2.1 lnmp配置
lnmp vhost add
- IIS
- 新建站點,配置
站點名稱
,域名
,端口
,站點目錄
- Handler Mappings->Add Module Mapping, 將
*.php
用FastCgi
來解析 - 配置重寫規(guī)則: URL Rewrite, 引入public目錄下
.htaccess
, 導入即可 - 配置首頁: Default Document, 添加
index.php
- 系統(tǒng)host: 將
域名
指向本地
- 修改文件權限:
storage
vendor