Discover Centmin Mod today
Register Now

Nginx Phalcon Framework

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Francisco Esteves, Sep 10, 2014.

  1. Francisco Esteves

    Francisco Esteves New Member

    23
    2
    3
    Sep 4, 2014
    Ratings:
    +2
    Local Time:
    3:22 PM
    Any one have tried to install phalcon on centminmod?
    This instalation tutorial will work on centminmod?

    Download Phalcon for Linux/Unix/Mac

    Code:
    git clone --depth=1 git://github.com/phalcon/cphalcon.git
    cd cphalcon/build
    sudo ./install
    


     
  2. eva2000

    eva2000 Administrator Staff Member

    53,149
    12,110
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,645
    Local Time:
    12:22 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Unfortunately, never used Phalcon. You can always try it on test server and see :)
     
    Last edited: Sep 11, 2014
  3. eva2000

    eva2000 Administrator Staff Member

    53,149
    12,110
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,645
    Local Time:
    12:22 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  4. rdan

    rdan Well-Known Member

    5,439
    1,397
    113
    May 25, 2014
    Ratings:
    +2,186
    Local Time:
    10:22 PM
    Mainline
    10.2
    Why don't need this? "php-mysqlnd"
     
  5. eva2000

    eva2000 Administrator Staff Member

    53,149
    12,110
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,645
    Local Time:
    12:22 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Centmin Mod by default already uses mysqlnd native driver see PHP PHP-FPM - Centmin Mod - Menu based Nginx installer for CentOS servers

    and PHP-FPM compile options

    PHP-FPM loaded modules

     
  6. Francisco Esteves

    Francisco Esteves New Member

    23
    2
    3
    Sep 4, 2014
    Ratings:
    +2
    Local Time:
    3:22 PM
    Hello,
    Thanks for help George, Phalcon installed with success.

    Now we have working on rewrite rules.

    Nginx Installation Notes — Phalcon 1.3.0 documentation
    Code:
      location ~ \.php {
      fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
      fastcgi_index /index.php;
    
      include /etc/nginx/fastcgi_params;
    
      fastcgi_split_path_info  ^(.+\.php)(/.+)$;
      fastcgi_param PATH_INFO  $fastcgi_path_info;
      fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
      fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
    
    Any idea to convert this to work with centminmod?

    Now have only this:

    Code:
      try_files $uri $uri/ @rewrite;
      }
      location @rewrite {
      rewrite ^/(.*)$ /index.php?_url=/$1;
      }
      location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
      root /home/nginx/domains/sppneumologia.pt/public;
      }
    
      location ~ /\.ht {
      deny all;
      }
    
    Thanks,
     
  7. eva2000

    eva2000 Administrator Staff Member

    53,149
    12,110
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,645
    Local Time:
    12:22 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Centmin Mod already takes care of part of PHP rewrite rules see your Nginx vhost include file for php.conf at /usr/local/nginx/conf/php.conf

    Code:
    include /usr/local/nginx/conf/php.conf;
    probably only need

    Code:
    try_files $uri $uri/ @rewrite;
    
    location @rewrite {
    rewrite ^/(.*)$ /index.php?_url=/$1;
    }
    
    location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
    root /home/nginx/domains/sppneumologia.pt/public;
    }
    
      location ~ /\.ht {
      deny all;