Nginx


Nginx config for Zend Framework 1

My server is running Ubuntu with Nginx and php5-fpm. I wasn’t able to find a quick drop in config for my zend framework 1 project so I wanted to share what I was able to get working. Also notice nginx is listening to tcp port 9000 instead of the default unix socket.

server {
  listen 80;
  server_name local-mysite.com;
  root /var/www/mysite/public_html;
 
  location / {
   try_files $uri $uri/ /index.php$is_args$args;
   index index.php;
  }
 
  # PHP scripts will be forwarded to fastcgi processess.
  location ~ \.php$ {
   include /etc/nginx/fastcgi_params;
 
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
  }
}