【问题标题】:localhost/phpmyadmin 404 error本地主机/phpmyadmin 404 错误
【发布时间】:2013-08-14 23:32:33
【问题描述】:

我已安装 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,或者我做错了什么?谢谢

【问题讨论】:

  • 尝试将*.conf 更改为apache.conf
  • 是的。现在禁止了

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


【解决方案1】:

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

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(当然只有本地主机)。

【讨论】:

    猜你喜欢
    • 2012-11-03
    • 2012-10-31
    • 2018-06-27
    • 1970-01-01
    • 2017-07-13
    • 2017-02-05
    • 1970-01-01
    • 1970-01-01
    • 2018-10-06
    相关资源
    最近更新 更多