0
Ubuntu的14.04 + nginx的+ PHP-FPM(PHP 5.5.9) 的Kohana 3.3.4Kohana不工作。不是來自課堂。 Nginx + php-fpm。 Digatal海洋
地址:http://188.166.65.233/ ErrorException [致命錯誤]:類 'HTTP_Exception' 未找到
沒有找到模型類,控制器...什麼都沒有 錯誤是由於Kohana沒有看到Controller_Sites,雖然它在文件夾中。在本地機器的現場工作正常
==== 配置:
php.ini中是默認的,但:cgi.fix_pathinfo = 1個
nginx的站點可用默認:
server {
listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
root /var/www/martds.ru;
index index.html index.php index.htm;
server_name martds.ru www.martds.ru;
location/{
try_files $uri $uri/ /index.php?q=$uri&$args;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-for $remote_addr;
proxy_set_header Host $host;
# try_files $uri $uri/ =404;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
location ~ /\.ht {
deny all;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
try_files $uri $uri/ /index.php?q=$uri&$args;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
}
location ~* \.(jpg|jpeg|gif|png|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|tar|wav|bmp|rtf|swf|ico|flv|txt|xml|docx|xlsx)$ {
root /var/www/martds.ru;
index index.html index.php;
access_log off;
expires 30d;
}
location ~* ^/(?:modules|system)\b.* {
rewrite ^(.+)$ /index.php$1 permanent;
}
location ~ /\.ht {
deny all;
}
}
也許你有php自動加載器的錯誤。 – bato3