From f5d0085cec931bcd424bed0bb86f5c445777c9e3 Mon Sep 17 00:00:00 2001 From: JaguarJack <82664165@qq.com> Date: Thu, 24 Jan 2019 09:14:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/README.md b/README.md index 9684da8..b1e106c 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ - mysql >= 5.5 # install +- curl -sS http://install.phpcomposer.com/installer | php - composer config -g repo.packagist composer https://packagist.laravel-china.org - composer update - 修改根目录下 .env.emp .env @@ -15,6 +16,47 @@ - 配置虚拟域名 OR 在根目录下执行 php think run - yourUrl/login - 默认用户名 admin 密码 admin + +# nginx 配置 +``` +server { + listen 端口; + server_name 域名; + + access_log logs/wenwen.access.log; + + root 项目目录/public; + index index.php index.html index.htm; + + location / { + index index.php index.html index.htm; + + if (!-e $request_filename) { + rewrite ^(.*)$ /index.php?s=$1 last; + break; + } + } + + #error_page 404 /404.html; + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root html; + } + + location ~ \.php$ { + root 项目目录/public; + fastcgi_pass phpfastcgi; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } + + location ^~ /data { + deny all; + } + } + +``` # Problem > SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'updated_at'