V
V
viktortokarev8822018-03-08 00:21:44
linux
viktortokarev882, 2018-03-08 00:21:44

phpmyadmin. “File not found” error (php-fpm)?

Greetings!

It turned out quite voluminous, please take some of your time, thanks!

It is worth CentOS (LEMP), until recently I did not use systemd, I included all the components manually (with commands: mysqld, nginx, php-fpm), I decided to use the same systemctl, since it is more convenient with it, I use all '.service' supplied from the repositories .

Everything works perfectly, except for one moment. I have two servers in nginx: " example.com " and " sql.example.com " (phpmyadmin for the first site). After I turn on php-fpm with systemctl(systemctl start php-fpm) and try to go to " sql.example.com ", my browser gives me a page where it says in black and white: "File not found.",

In the nginx logs the following: "FastCGI sent in stderr: "Primary script unknown"", i.e. php-fpm can't find the required file.

The first site goes without any problems, the configuration is almost the same everywhere, only the folders for certificates and the sites themselves have been changed: "/usr/share/nginx/localhost" (main site) and "/usr/share/nginx/phpmyadmin".

The most interesting thing is this: no matter what path I specify, for example, to the phpmyadmin picture file ( sql.example.com/picture.png ), the same error will return, but if I don’t care where I insert my file (let’s say in root file "test.php") and try to run this file ( sql.example.com/test.php ), it will be processed and the page of this file will be returned!


What I just didn’t try .. As a result, I set permissions to 777 and (nginx: nginx) for the entire phpmyadmin folder and internal files, but that didn’t help

either . I was able to view my files.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
viktortokarev882, 2018-03-08
@viktortokarev882

I suffered for two days, this answer helped:
https://stackoverflow.com/a/26228202
Maybe someone will come in handy.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question