美文网首页
2. laravel安装配置

2. laravel安装配置

作者: 代码学堂 | 来源:发表于2016-09-10 01:55 被阅读0次

一键下载安装


http://www.golaravel.com/download/

composer安装


    composer create-project laravel/laravel book --prefer-dist

服务器配置


  1. apaceh
  • 配置httpd-conf:php5_module rewrite_module listen监听端口
  • 配置extra/httpd-vhost(虚拟主机,多站点): 端口 站点 域名 默认首页
  • 系统hosts文件: 将域名指向本地
  • 重启apache
  • 修改文件权限: storage vendor
  1. 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
  • 修改文件权限: storage vendor

2.1 lnmp配置

     lnmp vhost add
  1. IIS
  • 新建站点,配置 站点名称, 域名, 端口, 站点目录
  • Handler Mappings->Add Module Mapping, 将 *.phpFastCgi 来解析
  • 配置重写规则: URL Rewrite, 引入public目录下 .htaccess, 导入即可
  • 配置首页: Default Document, 添加 index.php
  • 系统host: 将 域名 指向 本地
  • 修改文件权限: storage vendor

相关文章

网友评论

      本文标题:2. laravel安装配置

      本文链接:https://www.haomeiwen.com/subject/gbryettx.html