使用d更改httpd.conf文件上的参数

2024-09-25 00:31:17 发布

您现在位置:Python中文网/ 问答频道 /正文

我用docker。我尝试更改httpd.conf文件上的参数超时:

TypesConfig '/etc/mime.types'


<IfVersion < 2.4>
DefaultType text/plain
</IfVersion>

TypesConfig '/etc/mime.types'

HostnameLookups Off
MaxMemFree 64
Timeout 60
ListenBacklog 500

<IfDefine MOD_WSGI_WITH_HTTP2>
Protocols h2 h2c http/1.1
</IfDefine>

<IfVersion >= 2.2.15>
RequestReadTimeout header=15-30,MinRate=500 body=15,MinRate=500
</IfVersion>

LimitRequestBody 1073741824

问题是需要重新启动docker以通过docker downdocker-compose up -d命令保存更改,然后重新创建文件

如何在上传docker之前更改超时参数


Tags: 文件dockertext参数confetchttpdtypes
1条回答
网友
1楼 · 发布于 2024-09-25 00:31:17

而不是从docker实例设置值。尝试在项目中重新创建文件,然后使用卷引用它:

version: "3"
services:
  #assuming the following service is the one that has the conf file
  app:
    volumes:
      - /path/inside/instance/to/httpd.conf:./path/in/app/folder/to/httpd.conf
    #other settings ...

然后您可以对此文件进行任何编辑,它将覆盖另一个文件。别忘了在那之后重启docker

相关问题 更多 >