我已经启动了nginx并运行了Docker。
more_clear_headers 'Server';
more_clear_headers 'X-Powered-By';
之后它就停止工作了。显然这是由一个名为nginx-plus-module-headers-more
的模块提供的。我有一个Dockfile
FROM nginx:latest
RUN apt update && apt install -y iputils-ping wget
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
EXPOSE 443
由于这个容器已经在运行,因此连接了一个bash并执行了以下命令:
#> apt update
Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://deb.debian.org/debian-security bullseye-security InRelease
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
#> apt install -y libnginx-mod-http-headers-more-filter
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies: nginx : Conflicts: nginx-common but 1.18.0-6.1+deb11u3 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
#>
在这一点上,我得到的印象,我已经采取了错误的转折。任何建议,我应该如何安装这个模块?
”
1条答案
按热度按时间dfddblmv1#
只需在
apt
安装的末尾添加: