您的位置:首页 > 编程语言 > PHP开发

Openresty配置YII框架

2016-05-30 00:00 363 查看
[code=plain]	server {
listen 80;
server_name www.myserver_name.com;
index index.html index.htm index.php;
root /usr/local/openresty/nginx/html/manager/lebi; #笔者的YII的业务代码和framework都放在html目录下的manager目录
autoindex on;

access_log /usr/local/openresty/nginx/logs/queue.access.log;
error_log /usr/local/openresty/nginx/logs/queue.error.log;

rewrite "^/sitemap.xml" /uploads/sitemap/sitemap.xml last;

error_page 500 502 503 504 /50x.html;
location / {
if (!-e $request_filename){
rewrite ^/(.*) /index.php last;
}
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: