问题:
已经安装了最新的稳定版本的Nginex(1.4.4),并且想安装phpMyAdmin,不幸的是当我尝试在我的浏览器中通过http:// 192打开phpMyAdmin时出现以下错误. . . / phpMyAdmin的:
究竟Nginx找不到phpMyAdmin文件的原因是什么?
这是我的/etc/nginx/nginx.conf文件的内容:
解决方法:
正确的方法是创建一个名为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中文网最新课程二维码](http://m.sbmmt.com/tool/static/images/article_wechat2021.jpg?1111)
声明:本文原创发布php中文网,转载请注明出处,感谢您的尊重!如有疑问,请联系admin@php.cn处理
网友评论
文明上网理性发言,请遵守 新闻评论服务协议
我要评论