
问题:
已经安装了最新的稳定版本的Nginex(1.4.4),并且想安装phpMyAdmin,不幸的是当我尝试在我的浏览器中通过http:// 192打开phpMyAdmin时出现以下错误. . . / phpMyAdmin的:

究竟Nginx找不到phpMyAdmin文件的原因是什么?
这是我的/etc/nginx/nginx.conf文件的内容:
立即学习“PHP免费学习笔记(深入)”;

解决方法:
正确的方法是创建一个名为php的文件并添加到/ etc / nginx / sites-available.您可以复制下面的文件,但将端口号更改为其他内容。
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: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;
}}现在,您需要对启用了站点的目录进行符号链接
ln -s / etc / nginx / sites-available / php // etc / nginx / sites-enabled
现在您需要将此代码添加到nginx.conf的Logging Settings部分
log_format main ‘$remote_addr – $remote_user [$time_local] ‘
‘”$request” $status $body_bytes_sent “$http_referer” ‘
‘”$http_user_agent” “$http_x_forwarded_for”‘ ;现在您可以使用http://example.com:30425访问您的phpmyadmin。
相关文章教程推荐:phpmyadmin教程
以上就是nginx下找不到phpmyadmin文件的详细内容,更多请关注php中文网其它相关文章!
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号