Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Here are the pertinent lines of my nginx.conf file.

location / {
    try_files $uri $uri/ /index.php @rewrite;

location @rewrite {
    rewrite ^/customer/(.*)$ /customersDisplay.php?id=$1;
    rewrite ^/attc2/(.*)$ /usr/www/vault/$1;
    rewrite ^/xport/(.*)$ /usr/www/files/innoMatrix/xport/$1;
    rewrite ^/forms/(.*)$ /usr/www/files/innoMatrix/forms/$1;
    rewrite ^/grafx/(.*)$ /usr/www/files/innoMatrix/grafx/$1;

location ~ \.php$ {
    try_files $uri =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/var/run/php-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    fastcgi_param DATABASE innoMatrix;
    include fastcgi_params;

Can anyone right off had see why customer wouldnt be handed off to the fpm socket? It redirects properly, but downloads the file instead of interpreting it in PHP. I use a nearly identical config for my phalcon based app and it works a champ.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.