您的位置:首页 > 运维架构 > Nginx

让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;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  nginx yii