【问题标题】:Inside “sudo nano /etc/apache2/apache2.conf” after inserting “Include /etc/phpmyadmin/apache.conf ”.When I enter this in “sudo apache2ctl restart”在“sudo nano /etc/apache2/apache2.conf”里面插入“Include /etc/phpmyadmin/apache.conf”。当我在“sudo apache2ctl restart”中输入这个
【发布时间】:2021-08-29 01:41:39
【问题描述】:

这是编辑器中的代码:

 <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 指令可能永远不会匹配,因为它与早期的 Alias 重叠.

以上错误显示在终端中。

谁能帮我解决这个错误。

【问题讨论】:

  • 您可能使用了一个您之前已经使用过的指令作为 phpmyadmin/apache.conf 文件中的基本路径。请分享 phpmyadmin/apache.conf 以获得更清晰的信息。
  • @Kavish Baghel 我参考了一个 youtube 教程来下载和安装 apache、php、mysql、phpmyadmin。所以你能告诉我在哪里可以找到 phpmyadmin/apache.conf
  • 该文件应该在您添加的相同路径上,即 /etc/phpmyadmin/apache.conf

标签: phpmyadmin


【解决方案1】:

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

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

【讨论】:

    猜你喜欢
    • 2015-12-02
    • 1970-01-01
    • 2014-03-16
    • 2015-02-13
    • 2018-03-01
    • 2012-07-03
    • 1970-01-01
    • 2018-02-18
    • 2018-02-16
    相关资源
    最近更新 更多