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.

I'm getting "No input file specified." when I attempt to browse to the phpmyadmin domain, not sure what I'm doing wrong.. using both php-fpm and php-cgi, php-fpm is currently working another directory fine..Had to change the port number to 8888 since -fpm was already using 9000

http://pastebin.com/kdEckiL3

from nginx.conf:

server {
    listen 80;
    server_name phpmyadmin.domain.com;
    access_log /home/fanboy/logs/phpmyadmin.access_log;
    error_log /home/fanboy/logs/phpmyadmin.error_log;

location / {
    root /usr/share/phpmyadmin;
    index index.php;
    }

location ~ \.php$ {
    fastcgi_pass 127.0.0.1:8888;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$fastcgi_script_name;
    include /usr/local/nginx/conf/fastcgi.conf;
    }
}
share|improve this question

2 Answers 2

A better way will be relocate your "root" line out of your location block.

server {
    listen 80;
    server_name phpmyadmin.domain.com;
    access_log /home/fanboy/logs/phpmyadmin.access_log;
    error_log /home/fanboy/logs/phpmyadmin.error_log;

    root /usr/share/phpmyadmin;

    location / {
        index index.php;
    }

    location ~ \.php$ {
        fastcgi_pass 127.0.0.1:8888;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$fastcgi_script_name;
        include /usr/local/nginx/conf/fastcgi.conf;
    }
}

Apparently nginx server configuration some how missed the document root setting.

Got this idea from Nginx Configuration Guide for PHP FastCGI.

share|improve this answer
    
Awesome. This worked. Kudos! –  curlyreggie Sep 19 '13 at 11:44
    
Glad it helps :) –  Sian Lerk Lau Dec 10 '13 at 4:23

fastcgi.conf is redefining SCRIPT_FILENAME to $document_root$fastcgi_script_name. If you set the root in the server (Just remove the "location / {" and matching }) and remove the SCRIPT_FILENAME line from your php location, it should work fine.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.