Nginx1.8运行Laravel5的配置
2015-10-13 12:06
537 查看
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;
}
}
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;
}
}
相关文章推荐
- Nginx报错及解决方案汇总
- Nginx配置文件详细说明
- 性能测试之Nginx性能调优课程
- Nginx防蜘蛛爬虫处理
- nginx+php-fpm+mysql分离部署详解
- CentOS 6.5 安装 Nginx 1.7.8 教程
- ubuntu下nginx的安裝
- nginx rewrite 参数和例子
- Linux/Nginx如何查看搜索引擎蜘蛛爬虫的行为
- web nginx hls 流媒体
- Linux上安装Nginx及常用命令
- 第 二 十 八 天 :nginx 扩 展 负 载 均 衡 集 群
- nginx location配置详细解释
- nginx的启动文件配置
- CentOS6.5下Nginx1.7.4安装记录
- 配置nginx的web服务,结果报403错误
- Nginx配置文件nginx.conf中文详解(总结)
- 精通Nginx基础篇之安装配置
- linux/centos安装nginx常见错误及解决办法
- 为什么Nginx的性能要比Apache高得多?