首页 > 解决方案 > 在“sudo nano /etc/apache2/apache2.conf”里面插入“Include /etc/phpmyadmin/apache.conf”。当我在“sudo apache2ctl restart”中输入这个

问题描述

这是编辑器内的代码:

 <Directory />
            Options FollowSymLinks
            AllowOverride None
            Require all denied
    </Directory>

<Directory /usr/share>
        AllowOverride None
        Require all granted
</Directory>

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

#<Directory /srv/>
#       Options Indexes FollowSymLinks
#       AllowOverride None
#       Require all granted
#</Directory>




# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#
AccessFileName .htaccess
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
        Require all denied
</FilesMatch>


#
# The following directives define some format nicknames for use with
# a CustomLog directive.
#
# These deviate from the Common Log Format definitions in that they use %O
# (the actual bytes sent including headers) instead of %b (the size of the
# requested file), because the latter makes it impossible to detect parti>
# requests.
#
# Note that the use of %{X-Forwarded-For}i instead of %h is not recommend>
# Use mod_remoteip instead.
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent>
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" >
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.

# Include generic snippets of statements

IncludeOptional conf-enabled/*.conf:w
Include /etc/phpmyadmin/apache.conf

# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
ServerName 127.0.0.1

Include /etc/phpmyadmin/apache.conf

[Fri Jun 11 21:12:06.484390 2021] [alias:warn] [pid 23171] AH00671:/etc/phpmyadmin/apache.conf 第 3 行中的 Alias 指令可能永远不会匹配,因为它与早期的别名重叠。

上述错误显示在终端中。

有人可以帮我解决这个错误。

标签: phpmyadmin

解决方案


首先,您两次放置了相同的指令:Include /etc/phpmyadmin/apache.conf在您粘贴的文件中出现两次。你真的应该只需要它一次。

但是,这里更明显的问题是您根本不必这样做。您必须使用打包版本(基于您引用的路径和文件名),通过 apt 或 dpkg 或 yum 或其他方式安装,在这种情况下,包管理器应该为您更改所有配置,您不需要手动编辑任何内容。您应该恢复您的更改并尝试重新安装/重新配置 phpMyAdmin 软件包,然后如果您仍然遇到问题,请发布您遇到的确切问题。


推荐阅读