一键下载安装
http://www.golaravel.com/download/
composer安装
composer create-project laravel/laravel book --prefer-dist
服务器配置
- apaceh
- 配置httpd-conf:
php5_modulerewrite_modulelisten监听端口 - 配置extra/httpd-vhost(虚拟主机,多站点):
端口站点域名默认首页 - 系统hosts文件: 将
域名指向本地 - 重启apache
- 修改文件权限:
storagevendor
- 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;
} - 配置重写规则
location ~ / {
try_files $uri $uri/ /index.php?query_string;
} - 系统hosts文件: 将
域名指向本地 - 重启apache
- 修改文件权限:
storagevendor
2.1 lnmp配置
lnmp vhost add
- IIS
- 新建站点,配置
站点名称,域名,端口,站点目录 - Handler Mappings->Add Module Mapping, 将
*.php用FastCgi来解析 - 配置重写规则: URL Rewrite, 引入public目录下
.htaccess, 导入即可 - 配置首页: Default Document, 添加
index.php - 系统host: 将
域名指向本地 - 修改文件权限:
storagevendor