I am new to nginx and installing phpmyadmin on it. I'm on a Debian stretch distro. The no input file specified
error I'm getting when trying to visit /phpmyadmin
comes up over and over on StackOverflow but they all seem to be older posts. Trying to piece together the proper config from many different suggestions on the web has been a nightmare. I tried some of the solutions mentioned but none worked for me. Here's my complete config file:
server {
gzip on;
gzip_types text/plain text/html text/css application/javascript;
root /home/me/projects/MyApp/public;
location / {
try_files $uri @proxy;
expires max;
}
location @proxy {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:5000;
}
location /phpmyadmin {
alias /usr/share/nginx/html/phpmyadmin;
index index.php index.html;
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
location ~ /\.ht {
deny all;
}
}
}
OK, here is the section of my config file that at least works (I can't guarantee it is secure) with phpmyadmin:
location /phpmyadmin/ {
alias /usr/share/nginx/html/phpmyadmin/;
index index.php index.html;
location ~* \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
location ~ /\.ht {
deny all;
}
}
I also had to comment out a line in my php.ini file that I had uncommented out per a suggestion of some online tutorial:
cgi.fix_pathinfo=0
to
;cgi.fix_pathinfo=0