让nginx支持YII2的配置写法
2016-08-04 15:05
169 查看
location ~* \.(ttf|ttc|otf|eot|woff)$ {
add_header Access-Control-Allow-Origin *;
}
location / {
index index.php;
if (!-e $request_filename){
rewrite ^/(.*) /index.php last;
}
}
location ~ \.php$ {
include /opt/openresty/nginx/conf/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/html/yii2/web$fastcgi_script_name;
}
add_header Access-Control-Allow-Origin *;
}
location / {
index index.php;
if (!-e $request_filename){
rewrite ^/(.*) /index.php last;
}
}
location ~ \.php$ {
include /opt/openresty/nginx/conf/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/html/yii2/web$fastcgi_script_name;
}
相关文章推荐
- nginx代理指定目录
- 访问Nginx发生SSL connection error的一种情况
- Nginx+Naxsi部署专业级Web应用防火墙
- CentOS 6.2实战部署Nginx+MySQL+PHP
- nginx中http核心模块的配置指令2
- nginx中http核心模块的配置指令3
- nginx中http核心模块的配置指令4
- nginx中http的fastcgi模块的配置指令1
- Nginx 学习笔记(一)
- 网站502与504错误分析
- 用zabbix监控nginx_status状态
- 艰难完成 nginx + puma 部署 rails 4的详细记录
- 把Lua编译进nginx步骤方法
- web 应用中常用的各种 cache详解
- Linux系统上配置Nginx+Ruby on Rails+MySQL超攻略
- YII Framework框架教程之安全方案详解
- Yii PHP Framework实用入门教程(详细介绍)
- window+nginx+php环境配置 附配置搭配说明
- PHP的Yii框架中Model模型的学习教程