localhost / phpmyadmin 404错误

时间:2013-08-13 11:13:36

标签: apache phpmyadmin localhost http-status-code-404

我已安装phpmyadmin,但似乎无法正常工作。 我也安装了apache2,php5,php-cgi,mysql-server,mysql-client。 我已经在apache2.conf文件中添加了下一行:

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

但是当我重新启动服务器时,我有下一个错误:

* 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.

错误日志说:

[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

我该怎么做才能定义alias.url,或者我做错了什么?感谢

1 个答案:

答案 0 :(得分:3)

解决@Jamie Taylor评论:尝试将* .conf更改为apache.conf 。 然后获得403响应禁止,并通过添加:

解决它
Order allow,deny
Allow from all 

<Directory "/usr/share/phpmyadmin"> </Directory> 
/etc/phpmyadmin/apache.conf

中的

不要忘记取消注释:

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

/etc/phpmyadmin/config.inc.conf中,如果你想在没有密码的情况下使用PHPMyAdmin(当然只有localhost)。