laravel安裝小bug及nginx配置檔保存

laravel 2016年4月12日

[vc_row][vc_column][vc_column_text]今天使用 laravel v1.3.2的 installer 安裝 laravel 之後 new 了一個 project,結果出現了詭異的問題。

TTY  mode is not supported on windows platform.

難道是 windows 的錯!?

結果看來不是,因該是 laravel 1.3.2 installer 的 bug 。

2014-4-11-installlaravelfind

解法

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

[/vc_column_text][/vc_column][/vc_row][vc_row][vc_column][vc_text_separator title=”nginx 配置檔”][vc_column_text]

server { #监听端口 listen 8000; #域名 server_name servername; #默认访问的文件 index index.html index.htm index.php; #代码根目录 root path_to_your_dir_name; charset utf-8; #匹配站点内的所有链接 # 将http://meitubar.com/users 这样的请求全部转发到index.php/users 上面去,其实就是rewrite了 location / { try_files $uri $uri/ /index.php?$query_string; } # try_files 及$uri 的具体含义参考: HttpCoreModule location = /favicon.ico { access_log off; log_not_found off; } # 匹配favicon.ico时,关闭日志 location = /robots.txt { access_log off; log_not_found off; } # 同上 # 不知道为什么我的Laravel如果木有设置下面的缓存时间的话,会直接404返回回来 location ~ .*.(js|css|png|jpg)?$ { expires 12h; # 设置缓存时间 } access_log off; # 关闭访问日志 error_log D:/works/php/meitubar-error.log error; #设置错误日志的位置 error_page 404 /index.php; # 定义出错页面,出错时,直接跳转到首页 sendfile off; # 关闭sendfile选项 # 配置解析php文件的方式 location ~ .php$ { #root path_to_your_dir; fastcgi_pass 127.0.0.1:9123; #fastcgi_param HTTPS on; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~ /.ht { deny all; } }

[/vc_column_text][/vc_column][/vc_row]

鳥祐

前端愛好者 email: [email protected]

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.