简体   繁体   English

本地主机/ phpmyadmin 404错误

[英]localhost/phpmyadmin 404 error

I have installed phpmyadmin, but doesn't seem to work. 我已经安装了phpmyadmin,但似乎无法正常工作。 I have apache2, php5, php-cgi, mysql-server, mysql-client installed too. 我也安装了apache2,php5,php-cgi,mysql-server,mysql-client。 I've added the next line to the apache2.conf file: 我已经将下一行添加到apache2.conf文件中:

#include phpmyadmin
Include /etc/phpmyadmin/*.conf

But when I restart the server, I have the next error: 但是,当我重新启动服务器时,出现下一个错误:

* Restarting web server     apache2                                                                           [fail] 
* The apache2 configtest failed.
Output of config test was:
AH00526: Syntax error on line 2 of /etc/phpmyadmin/lighttpd.conf:
Invalid command 'alias.url', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.

And the error log says: 错误日志显示:

[Tue Aug 13 12:36:25.690262 2013] [mpm_prefork:notice] [pid 13210] AH00163: Apache/2.4.6 (Ubuntu) PHP/5.5.1-2+debphp.org~precise+2 configured -- resuming normal operations
[Tue Aug 13 12:36:25.690358 2013] [core:notice] [pid 13210] AH00094: Command line: '/usr/sbin/apache2'
[Tue Aug 13 12:39:21.635566 2013] [mpm_prefork:notice] [pid 13210] AH00169: caught SIGTERM, shutting down

What should I do to define alias.url, or what am I doing wrong? 我应该怎么定义alias.url,或者我做错了什么? Thanks 谢谢

Solved with @Jamie Taylor comment: try changing *.conf to apache.conf . 通过@Jamie Taylor评论解决: 尝试将* .conf更改为apache.conf Then get 403 response forbidden , and solved it by adding: 然后获得403 禁止响应,并通过添加以下内容解决了该问题:

Order allow,deny
Allow from all 

to

<Directory "/usr/share/phpmyadmin"> </Directory> 

in /etc/phpmyadmin/apache.conf /etc/phpmyadmin/apache.conf

And don't forget to uncomment: 并且不要忘了取消注释:

$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;

in /etc/phpmyadmin/config.inc.conf , if you want to use PHPMyAdmin without password (only localhost, of course). 如果您想使用不带密码的PHPMyAdmin(当然只有localhost),则在/etc/phpmyadmin/config.inc.conf

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM