phpstudy2017版本的nginx 支持laravel 5.X配置
之前做开发和学习一直用phpstudy的mysql服务,确实很方便,开箱即用。QQ群交流:697028234
现在分享一下最新版本的phpstudy2017 laravel环境配置。
最新版的phpstudy2017已支持php7,也就是说支持目前最新版的laravel了。
1、安装好phpstudy2017,下载laravel解压,我这是放到c:\laravel。
2、设置phpstudy的站点域名管理,自己定义一个域名。如www.herostore.cn 然后指定到c:\laravel。
3、修改host文件。我是win7哈。加入:127.0.0.1 www.herostore.cn
4、默认情况下,如果是用的apache,就已经可以运行laravel项目了。如果访问报Forbidden错误,再检查一下vhosts.conf文件。
看虚拟主机目录和参数是否设置正确,如下:
<VirtualHost *:80>
DocumentRoot "H:\code\blog"
ServerName www.blog.com
<Directory "H:\code\blog">
Options Indexes FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
重点来了。如果切换到nginx环境,就不行。报禁止访问的错误。
何解?手动修改nginx.conf文件。增加一个server即可。妈妈再也不用担心我的学习了。呵呵。
server {
listen 80;
server_name www.herostore.cn;
set $root_path 'c:/laravel/';
root $root_path;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php(.*)$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
}
location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
}
location ~ /\.ht {
deny all;
}
}
phpstudy2017版本的nginx 支持laravel 5.X配置的更多相关文章
- nginx 支持laravel 5.3配置
server { listen ; server_name www.baidu.com.cn; root /data/cehuiren/public; #charset koi8-r; #access ...
- nginx支持ssl双向认证配置
nginx支持ssl双向认证配置 listen 443; server_name test.com; ssl on; ssl_certificate server.crt; //server端公钥 s ...
- Nginx 支持 CI 框架的配置并禁止使用 ip 访问
#CIserver { listen 80; server_name www.ci.com; index index.php index ...
- Ubuntu下安装LNMP之php7的安装并配置Nginx支持php及卸载php
据了解,php7是比之前的版本性能快很多的.http://php.net/get/php-7.2.2.tar.gz/from/a/mirror 安装前也可提前将相关依赖库安装好,或者在安装php时若安 ...
- Ubuntu 14.04 上使用 Nginx 部署 Laravel
本教程将会涉及以下工具: Ubuntu 14.04 LTS PHP 5.5 MySQL Laravel 5.0 Nginx 参考文章:Ubuntu 14.04 上使用 Nginx 部署 Laravel ...
- centos7最小版本安装nginx+tomcat+java+mysql运行环境
最近项目从windows搬到linux,由于项目组成员有限并且有其它紧急的任务需要处理,因而这个任务就落到我的头上了.下面记录下centos最小版本安装nginx+tomcat+mysql+java的 ...
- ubuntu下使用nginx部署Laravel
问题描述 Laravel是PHP下当今最受欢迎的web应用开发框架,github上start数远超第二名Symfony,以前我用这个框架做项目的时候通常就是扔到apache里面,然后配置.htacce ...
- Nginx支持Socket转发过程详解
序言 一网友在群中问,nginx支持socket转发吗? 实话说,我没做过socket转发,但是我知道socket跟http一样都是通过tcp或者udp通信的,我猜测啦一下nginx应该支持吧,然后又 ...
- centos6.5配置uwsgi与nginx支持django
一.centos中升级python 1. > wget https://www.python.org/ftp/python/3.5.4/Python-3.5.4.tgz # https://ww ...
随机推荐
- ansible(3)
一.setup模块 ansible的setup模块主要用来收集信息,查看参数: [root@localhost ~]# ansible-doc -s setup # 查看参数,部分参数如下: filt ...
- Get,Post请求方式详解
前几天工作中,所有表单我都采用post方法,头儿说那样不好,大型网站上一般都采用get方法,不理解. 在网上摘到一段比较有用的话 减低服务器流量压力根据 HTTP 规范,GET 用于信息获取,而且应该 ...
- mysql误删表,无备份
mysql误删表,无备份 1.操作步骤:https://blog.csdn.net/u011277123/article/details/78018513?tdsourcetag=s_pctim_ai ...
- Ambari Rest api 使用
最近由于项目的需要在看一些Ambari的api去获取集群的一些信息,获取集群节点的状态信息以及各个服务和组件的信息.然后在我们的数据服务管理平台上去做一些监控运维,现在把一些使用总结一下:官网rest ...
- 2006 - MySQL server has gone away
mysql出现ERROR : (2006, 'MySQL server has gone away') 的问题意思就是指client和MySQL server之间的链接断开了. 造成这样的原因一般是s ...
- jmeter -xml日志格式中网络时间与服务器时间的区分
在 LR 中是有一个“网页细分图”的,通过这个图,你可以比较容易的区分哪些请求的响应时间最长,如果响应时间过程,是消耗在server处理的时候,还是消耗在网络传输过程中——也就是所谓的 Server ...
- Conductor
https://netflix.github.io/conductor/ High Level Architecture
- java fastjson 设置全局输出name最小化
1.通过自定义Filter实现 https://github.com/alibaba/fastjson/wiki/SerializeFilter public class JackJsonLowCas ...
- Java的Servlet、Filter、Interceptor、Listener
写在前面: 使用Spring-Boot时,嵌入式Servlet容器可以通过扫描注解(@ServletComponentScan)的方式注册Servlet.Filter和Servlet规范的所有监听器( ...
- bzoj2733 / P3224 [HNOI2012]永无乡(并查集+线段树合并)
[HNOI2012]永无乡 每个联通块的点集用动态开点线段树维护 并查集维护图 合并时把线段树也合并就好了. #include<iostream> #include<cstdio&g ...