konaha(konaha nginx 配置「终于解决」)

发布时间:2025-12-10 19:53:26 浏览次数:18

konaha nginx 配置「终于解决」-konoha排球少年是谁

konaha (1) nginx 配置「终于解决」1.直接配置nginx来支持kohanalocation~\.php${fastcgi_pass127.0.0.1:9000;fastcgi_indexindex.php;fas

1. 直接配置nginx 来支持kohana

location ~ \.php$ {            fastcgi_pass   127.0.0.1:9000;            fastcgi_index  index.php;            fastcgi_param  SCRIPT_FILENAME  $document_root/$fastcgi_script_name;            include        fastcgi_params;        }

是否还在为Ide开发工具频繁失效而烦恼,来吧关注以下公众号获取最新激活方式。亲测可用!

为防止网络爬虫,请关注公众号回复”口令”

激活idea 激活CLion DataGrip DataSpell dotCover dotMemory dotTrace GoLand PhpStorm PyCharm ReSharper ReShaC++ Rider RubyMine WebStorm 全家桶 刷新

【正版授权,激活自己账号】:Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】:官方授权 正版激活 自己使用,支持Jetbrains家族下所有IDE…


这样的话,在访问的 URL 里会有index.php的字样,不然的话,就没有办法来匹配上面的内容。


2. 配置ngxin支持没有index.php 的kohana


location /{                index index.php index.html index.htm;                if ( -f $request_filename){                        break;                }                if ( -d $request_filename)                {                        break;                }                rewrite ^(.+)$ /index.php?kohana_uri=$1 last;        }        location ~ \.php$ {                fastcgi_pass    127.0.0.1:9000;                fastcgi_index   index.php;                fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;                include fastcgi_params;        }

笔者在是在自己的环境中,配置了两个虚拟主机, 一个是kohana hosted,一个是直接用来测试php 文件的。

通过更改 c:\windows\system32\etc\hosts 文件 来设置两个FQDN


直接来测试 php 脚本




支持Kohana MVC


需要做网站?需要网络推广?欢迎咨询客户经理 13272073477