Phalcon在nginx上无法正常工作

时间:2015-09-27 13:39:00

标签: php mod-rewrite nginx docker phalcon

今天我遇到了 Phalcon (2.0.7)的问题。

主要环境正在运行 Centos 7 ,它使用Debian的最新图像运行docker。在Docker上我安装了 PHP 5.4.45 Nginx 1.2.1

有配置文件(/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;
       }
    }   
}

我已将https://github.com/phalcon/vokuro项目克隆到

/var/www/vokuro 

它的文件为

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

所以上面的一切看起来都是正确的,但我认为它不起作用。错误报告已启用但未显示任何内容。

你们中的任何人都知道我在哪里犯了错误吗?这有什么问题?

PS。我写的配置在http://149.202.61.223/上运行,您可以检查它,但只有一个空白页。

PS1。 PHP工作正常,我可以做phpinfo或其他任何东西

PS2。 Phalcon也通过php / nginx识别(我已经检查过了)

0 个答案:

没有答案