2

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

4

1 回答 1

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

于 2013-08-13T19:13:54.380 回答