在Nginx 下运行 Laravel5.1 的配置
2016-01-08 19:16
676 查看
一、nginx 的 vhost.conf 配置:
二、测试:
在CentOS6.5 + Nginx1.8.0 +Laravel5.1测试通过
在windows 7 +Nginx1.6.5+Laravel5.1测试通过
server { listen 80; server_name sub.domain.com; set $root_path '/srv/www/default'; root $root_path; index index.php index.html index.htm; try_files $uri $uri/ @rewrite; location @rewrite { rewrite ^/(.*)$ /index.php?_url=/$1; } location ~ \.php { fastcgi_pass 127.0.0.1:9000; fastcgi_index /index.php; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~* ^/(css|img|js|flv|swf|download)/(.+)$ { root $root_path; } location ~ /\.ht { deny all; } }
二、测试:
在CentOS6.5 + Nginx1.8.0 +Laravel5.1测试通过
在windows 7 +Nginx1.6.5+Laravel5.1测试通过
相关文章推荐
- Linux下Nginx的安装与配置
- 安装nginx+ngx_lua支持WAF防护功能
- Linux下安装Nginx1.8.0
- Windows下Nginx的安装与使用(一):配置端口转发
- mac os源码编译NGINX和PHP环境
- flume + elasticSearch + kibana, 分析nginx日志
- nginx
- centos-6.6安装nginx-1.9.7和php7.0.0(二)
- Nginx去除版本号
- Nginx -- Gzip 压缩功能作用
- nginx 服务器重启命令,关闭 (转)
- centos-6.6安装nginx-1.9.7和php7.0.0(一)
- Nginx + CGI/FastCGI + C/Cpp
- windows php7+nginx配置
- 【转载】一淘技术专家王晓哲:Nginx_lua的测试及选择
- Nginx-关键概念解读
- 一些nginx配置
- Nginx的accept_mutex配置分析
- nginx的yum源
- 我与nginx的初次见面