doushi2047 2015-09-27 13:39
浏览 42

Phalcon在nginx上无法正常工作

Today I have a problem with Phalcon (2.0.7).

Main environment is running Centos 7 which runs docker with Debian's latest image. On Docker I have installed PHP 5.4.45 and Nginx 1.2.1

There is config file (/etc/nginx/nginx.conf)

user    www-data www-data;  ## Default: nobody
worker_processes 5;  ## Default: 1
error_log   logs/error.log;
#pid    logs/nginx.pid;
worker_rlimit_nofile 8192;

events {
worker_connections 4096;  ## Default: 1024
}

http {
    include mime.types;
    #   include /etc/nginx/proxy_conf;
    include /etc/nginx/fastcgi_params;
    index   index.html index.htm index.php;

    default_type application/octet-stream;
    log_format   main '$remote_addr - $remote_user [$time_local]  $status '
        '"$request" $body_bytes_sent "$http_referer" '
        '"$http_user_agent" "$http_x_forwarded_for"';
    access_log  logs/access.log main;
    sendfile    on;
    tcp_nopush  on;
    server_names_hash_bucket_size 128; # this seems to be required for some vhosts

    server {
        server_name 149.202.61.223;
        listen 80;

        #    access_log /srv/www/example.com/log/access.log;
        #    error_log /srv/www/example.com/log/error.log;

        root /var/www/vokuro/public;
        index index.html index.htm index.php;

        location / {
            try_files $uri $uri/ @php_mvc;
        }

        location @php_mvc {
            rewrite ^(.+)$ /index.php?_url=$1 last;
        }

        location ~ ^(.+\.php)(/.*)?$ {
             fastcgi_split_path_info ^(.+\.php)(/.*)?$;

             set $script_filename $document_root$fastcgi_script_name;

             if (!-e $script_filename) {
                 return 404;
             }

             fastcgi_pass unix:/var/run/php5-fpm.sock;
             fastcgi_index index.php;
             include fastcgi_params;

             fastcgi_param   APPLICATION_ENV development;
             fastcgi_param   SCRIPT_FILENAME $script_filename;
             fastcgi_param   SCRIPT_NAME $fastcgi_script_name;
             fastcgi_param   PATH_INFO $fastcgi_path_info;
       }
    }   
}

I've cloned https://github.com/phalcon/vokuro project to

/var/www/vokuro 

and it has files as

CONTRIBUTING.md  README.md  app  composer.json  index.html  public  schemas

So everything above looks corretly I suppose but it isn't working. Error reporting is on but it shows nothing.

Do anyone of you know where I have done a mistake? What's wrong with that?

PS. The configuration I wrote is running on http://149.202.61.223/ you can check it but there is only a blank page.

PS1. PHP is working fine i can do phpinfo or anything else

PS2. Phalcon is recognizing by php/nginx too (I have checked it)

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
    • ¥20 软件测试决策法疑问求解答
    • ¥15 win11 23H2删除推荐的项目,支持注册表等
    • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
    • ¥15 qt6.6.3 基于百度云的语音识别 不会改
    • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
    • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
    • ¥15 lingo18勾选global solver求解使用的算法
    • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
    • ¥20 测距传感器数据手册i2c