Get the App
SLTechnology News&Howtos  ›  Database  › 

What if the phpmyadmin file cannot be found under nginx

Shulou Source: shulou.com Published: 2022-06-01 00:48:44 11月14日 Update

Editor to share with you what to do if you can't find the phpmyadmin file under nginx. I hope you will get something after reading this article. Let's discuss it together.

Question:

I have installed the latest stable version of Nginex (1.4.4) and want to install phpMyAdmin. Unfortunately, the following error occurred when I tried to open phpMyAdmin through http:// 192 in my browser. . . / phpMyAdmin:

What on earth is the reason why Nginx cannot find the phpMyAdmin file?

This is the contents of my / etc/nginx/nginx.conf file:

Solution:

The correct way is to create a file called php and add it to / etc / nginx / sites-available. You can copy the following file, but change the port number to something else.

Server {listen 30425; # Don't want to log accesses. # access_log / dev/null main; access_log / var/log/nginx/php.acces_log main; error_log / var/log/nginx/php.error_log info; root / usr/share/phpmyadmin; index index.php index.html index.htm; error_page 401 403 404 / 404.php; location ~. * .php ${include fastcgi_params Fastcgi_pass 127.0.0.1 http_host; fastcgi_ignore_client_abort on; 9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SERVER_NAME $http_host; fastcgi_ignore_client_abort on;}

Now you need to symbolic link the site-enabled directory

Ln-s / etc / nginx / sites-available / php / / etc / nginx / sites-enabled

Now you need to add this code to the Logging Settings section of nginx.conf

Log_format main'$remote_addr-$remote_user [$time_local]'"$request" $status $body_bytes_sent "$http_referer"'"$http_user_agent"$http_x_forwarded_for"'

You can now access your phpmyadmin using http://example.com:30425.

After reading this article, I believe you have a certain understanding of "what to do if you can't find the phpmyadmin file under nginx". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!

Tags: Documents what to do content methods articles unfortunately code reasons slogans done more browsers versions directories knowledge sites symbols industries information information channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Microsoft Redmi Shulou Tech Info MySQL