Como correr KumbiaPHP bajo Nginx + PHP + FastCGI (sin apache)

248 views
Skip to first unread message

Edu.

unread,
Apr 6, 2012, 6:24:31 PM4/6/12
to kum...@googlegroups.com

Buenas tengo problemas con la instalacion que estoy haciendo en un server virtualizado con Centos 6.2  + NGINX + PHP-FPM + FastCGI  tengo algunos inconvenientes y estoy dejando apache a un lado ya que las aplicacion que estoy haciendo requiere de respuestas simultaneas por segundo y estoy haciendo un prototipo. ayudenme porfaaaa.  aqui las referencias dela instalacion.

aqui mas detalles:

aqui tengo kumbiaphp corriendo "aparentemente bien":

fijense en el tiempo de respuesta amigos con NGINX.

pero cuando doy clic en config para ver comunmente lo que falta configurar cuando es nueva instalacion descargada del blog kumbiaphp.

cambio la url por si acaso y fijense:

esto es un virtual host: /etc/nginx/conf.d/kumbia.conf:

=========================================================================================================

# location /etc/nginx/conf.d/domain.conf

# A virtual host using mix of IP-, name-, and port-based configuration


upstream php {

# server unix:/tmp/php-cgi.socket;

 server 127.0.0.1:9000;

}


server {


 ## Your website name goes here.

 server_name demo.com www.demo.com;


 ## Your only path reference.

 root /var/www/vhosts/demo.com/httpdocs;


 ## This should be in your http block and if it is, it.s not needed here.

 index index.php;


location = /favicon.ico {

 log_not_found off;

 access_log off;

 }


location = /robots.txt {

 allow all;

 log_not_found off;

 access_log off;

 }


location / {

 # This is cool because no php is touched for static content

 try_files $uri $uri/ /index.php;

 }


location ~* (^(?!(?:(?!(php|phtml|inc|ini)).)*/blogs\.dir/).*?(php|phtml|inc|ini)) {

  try_files $uri = 404;

  fastcgi_split_path_info ^(.+.php)(.*)$;

  fastcgi_pass php;

  fastcgi_index index.php;

  fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

  fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;

  fastcgi_param  SERVER_SOFTWARE    nginx;

  fastcgi_param  QUERY_STRING       $query_string;

  fastcgi_param  REQUEST_METHOD     $request_method;

  fastcgi_param  CONTENT_TYPE       $content_type;

  fastcgi_param  CONTENT_LENGTH     $content_length;

  fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;

  fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;

  fastcgi_param  REQUEST_URI        $request_uri;

  fastcgi_param  DOCUMENT_URI       $document_uri;

  fastcgi_param  DOCUMENT_ROOT      $document_root;

  fastcgi_param  SERVER_PROTOCOL    $server_protocol;

  fastcgi_param  REMOTE_ADDR        $remote_addr;

  fastcgi_param  REMOTE_PORT        $remote_port;

  fastcgi_param  SERVER_ADDR        $server_addr;

  fastcgi_param  SERVER_PORT        $server_port;

  fastcgi_param  SERVER_NAME        $server_name;

}


location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {

 expires max;

 log_not_found off;

 }

}


========================================================================================================= 

me falta algo en el rewrite???


HELP!!!!


Edu. Flores

(zedu77)





Fidel Oyarzo

unread,
Apr 8, 2012, 9:42:16 AM4/8/12
to kum...@googlegroups.com
prueba con esta confiracion,

server {
 ## Your website name goes here.
 server_name demo.com www.demo.com;
 listen 80
 ## Your only path reference.
 root /var/www/vhosts/demo.com/httpdocs/default/public;
 ## This should be in your http block and if it is, it.s not needed here.
 index index.php;
   charset utf-8;
  location / {
    # If the file exists as a static file serve it directly without
    # running all the other rewite tests on it
    if (-f $request_filename) {
      expires max;
      break;
    }
    if ($request_filename !~ "\.(js|htc|ico|gif|jpg|png|css)$") {
       rewrite ^(.*)$ /index.php?_url=$1 last;
    }
 }
  location ~ \.php($|/) {
    set  $script     $uri;
    set  $path_info  "";
    if ($uri ~ "^(.+\.php)($|/)") {
                set $script $1;
    }
    if ($uri ~ "^(.+\.php)(/.+)") {
                set $script $1;
                set $path_info $2;
    }
    fastcgi_pass   127.0.0.1:9000;
    #fastcgi_param HTTPS on;
    include /etc/nginx/fastcgi_params;
    fastcgi_param  SCRIPT_FILENAME  /var/www/vhosts/demo.com/httpdocs/default/public$script;
    fastcgi_param  PATH_INFO        $path_info;
    fastcgi_param  SCRIPT_NAME      $script;
  }
}






--
Viva KumbiaPHP Framework!
http://www.kumbiaphp.com/
Ha recibido este mensaje porque está suscrito a Grupo "KumbiaPHP Framework" de Grupos de Google.
Para obtener más opciones, visita este grupo en http://groups.google.com/group/kumbia?hl=es.



Edu. Flores

unread,
Apr 8, 2012, 2:47:57 PM4/8/12
to kum...@googlegroups.com
gracias, lo probaré...

2012/4/8 Fidel Oyarzo <fidel....@gmail.com>

Edu. Flores

unread,
Apr 8, 2012, 11:53:12 PM4/8/12
to kum...@googlegroups.com
Bieeeeeen, gracias por la ayuda encajo perfectamente, la rutas que finalizan en /httpdocs es suficiente ya que yo tengo a httpdocs como public y el app y el core detras, asi que eso nada más modifique a la configuracion que me enviaste Fidel, lo demas excelente todo corre super.


Imágenes integradas 1
ahi esta la evidencia una vez más gracias...


Edu. Flores


2012/4/8 Edu. Flores <e...@floresrobles.com>
06.jpg

Fidel Oyarzo

unread,
Apr 9, 2012, 12:03:18 AM4/9/12
to kum...@googlegroups.com
q Bien
06.jpg
Reply all
Reply to author
Forward
0 new messages