This is a nginx configuration that includes a mongrel cluster and php running as fcgi on port 1026. Mint is in approot/public/mint/ .
Edit it to fit your needs. Works for me :)
upstream filipcic {
server 127.0.0.1:8000;
}
server {
listen 192.168.1.2;
server_name filipcic.com www.filipcic.com;
access_log /var/log/nginx/filipcic.access_log main;
error_log /var/log/nginx/filipcic.error_log;
root /var/www/filipcic.com/current/public;
index index.html index.htm index.php;
# this rewrites all the requests to the maintenance.html
# page if it exists in the doc root. This is for capistrano's
# disable web task
if (-f $document_root/system/maintenance.html) {
rewrite ^(.*)$ /system/maintenance.html last;
break;
}
location /mint/ {
}
location ~ ^/mint/.*.php {
index index.php;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:1026;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/filipcic.com/current/public$fastcgi_script_name;
}
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect false;
# if this request matches a static file just send it out.
if (-f $request_filename) {
break;
}
if (-f $request_filename/index.html) {
rewrite (.*) $1/index.html break;
}
if (-f $request_filename.html) {
rewrite (.*) $1.html break;
}
if (!-f $request_filename) {
proxy_pass http://filipcic;
break;
}
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}