phpmyadmin - 在“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 指令可能永远不会匹配,因为它与早期的别名重叠。
上述错误显示在终端中。
有人可以帮我解决这个错误。
解决方案
首先,您两次放置了相同的指令:Include /etc/phpmyadmin/apache.conf
在您粘贴的文件中出现两次。你真的应该只需要它一次。
但是,这里更明显的问题是您根本不必这样做。您必须使用打包版本(基于您引用的路径和文件名),通过 apt 或 dpkg 或 yum 或其他方式安装,在这种情况下,包管理器应该为您更改所有配置,您不需要手动编辑任何内容。您应该恢复您的更改并尝试重新安装/重新配置 phpMyAdmin 软件包,然后如果您仍然遇到问题,请发布您遇到的确切问题。
推荐阅读
- c# - 如何在不显示 SaveDialog 的提示的情况下将文件保存在特定位置
- sql - “对于每名受到总罚金超过 150 美元的球员,请找出球员编号和罚金总额。”
- tensorflow - Keras 训练的模型不在 CPU 上运行
- javascript - 如何测试 SectionList 中的 onviewableitemschanged?
- python - 为要在 HTML 中显示的部分文本添加颜色
- pine-script - 在 Trading View Pine Script 中按颜色计算垂直线?
- laravel - 在路径中找不到 Laravel 文件(再次)
- javascript - Javascript 购物车 - 需要有关 javascript 部分的帮助,为什么我的代码不起作用?
- django - 如何在 Django JSONField(对象数组)数据上注释总和?
- python - python中的WhatsApp机器人