Giter Club home page Giter Club logo

Comments (13)

wyxls avatar wyxls commented on August 23, 2024 3

请问能更新hub.docker的文件吗?不会改代码这种!

你好,我今天也发现了这个问题。简单的解决办法是通过这个容器的终端进去
vi conf/conf-enabled/dav.conf
添加UTF8声明,然后重启容器,就解决了乱码。但是这个文件会随着容器更新被覆盖,所以可以把修改的文件放到宿主机,然后映射到conf/conf-available/dav.conf

非常感谢,请问申明的命令怎么写?

原image默认没有这一行,需要手动添加后再重启容器,但image更新的话又会被覆盖掉。推荐2个方法避免更新覆盖dav.conf
1、在宿主机外置保存修改好的dav.conf,然后通过volume挂载到对应路径(/usr/local/apache2/conf/conf-available/dav.conf),注意文件权限问题
2、自己build一个image,直接将声明UTF-8内置

<Directory "/var/lib/dav/data/">
  Dav On
  Options Indexes FollowSymLinks

  AuthType Basic
  AuthName "WebDAV"
  IndexOptions Charset=utf-8      <-----------添加这一行
  AuthUserFile "/user.passwd"
  <RequireAny>
    Require valid-user
  </RequireAny>
</Directory>

from docker-webdav.

peter-cls avatar peter-cls commented on August 23, 2024

Hello, there is a mess after deployment. It is found that utf8 was not declared. Where can I change it?

from docker-webdav.

brlin-tw avatar brlin-tw commented on August 23, 2024

Hello, I proposed a fix in the PR. Cheers!

from docker-webdav.

peter-cls avatar peter-cls commented on August 23, 2024

from docker-webdav.

peter-cls avatar peter-cls commented on August 23, 2024

请问能更新hub.docker的文件吗?不会改代码这种!

from docker-webdav.

xmu714 avatar xmu714 commented on August 23, 2024

请问能更新hub.docker的文件吗?不会改代码这种!

你好,我今天也发现了这个问题。简单的解决办法是通过这个容器的终端进去
vi conf/conf-enabled/dav.conf
添加UTF8声明,然后重启容器,就解决了乱码。但是这个文件会随着容器更新被覆盖,所以可以把修改的文件放到宿主机,然后映射到conf/conf-available/dav.conf

from docker-webdav.

peter-cls avatar peter-cls commented on August 23, 2024

请问能更新hub.docker的文件吗?不会改代码这种!

你好,我今天也发现了这个问题。简单的解决办法是通过这个容器的终端进去
vi conf/conf-enabled/dav.conf
添加UTF8声明,然后重启容器,就解决了乱码。但是这个文件会随着容器更新被覆盖,所以可以把修改的文件放到宿主机,然后映射到conf/conf-available/dav.conf

非常感谢,请问申明的命令怎么写?文件内容如下

DavLockDB "/var/lib/dav/DavLock"
Alias / "/var/lib/dav/data/"
<Directory "/var/lib/dav/data/">
Dav On
Options Indexes FollowSymLinks

AuthType Digest
AuthName "WebDAV"
AuthUserFile "/user.passwd"

Require valid-user

These disable redirects on non-GET requests for directories that

don't include the trailing slash (for misbehaving clients).

BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[01234]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
BrowserMatch " Konqueror/4" redirect-carefully
BrowserMatch "^gvfs" redirect-carefully

from docker-webdav.

peter-cls avatar peter-cls commented on August 23, 2024
IndexOptions Charset=utf-8

问题解决了,多谢!!此镜像应该不会更新了!

from docker-webdav.

xmu714 avatar xmu714 commented on August 23, 2024

@wyxls 感谢层主的方法,我之前在做覆盖的时候,直接从它的命令里面找的源路径conf/conf-available/dav.conf
结果依然被覆盖,看了你的回复才想起来要用绝对路径。

from docker-webdav.

wyxls avatar wyxls commented on August 23, 2024

@wyxls 感谢层主的方法,我之前在做覆盖的时候,直接从它的命令里面找的源路径conf/conf-available/dav.conf
结果依然被覆盖,看了你的回复才想起来要用绝对路径。

其实Dockerfile里有注释,httpd:alpine镜像拉取后默认workdir是/usr/local/apache2

# These variables are inherited from the httpd:alpine image:
# ENV HTTPD_PREFIX /usr/local/apache2
# WORKDIR "$HTTPD_PREFIX"

from docker-webdav.

peter-cls avatar peter-cls commented on August 23, 2024

@wyxls @xmu714 感谢层主的方法,我之前在做覆盖的时候,直接从它的命令里面找的源路径conf/conf-available/dav.conf
结果依然 被覆盖,看了你的回复才想起来要用绝对路径。

请问是要映射/usr/local/apache2嘛?我映射了也没有dav.conf这个文件?

from docker-webdav.

peter-cls avatar peter-cls commented on August 23, 2024

@wyxls 感谢层主的方法,我之前在做覆盖的时候,直接从它的命令里面找的源路径conf/conf-available/dav.conf
结果依然被覆盖,看了你的回复才想起来要用绝对路径。

其实Dockerfile里有注释,httpd:alpine镜像拉取后默认workdir是/usr/local/apache2

# These variables are inherited from the httpd:alpine image:
# ENV HTTPD_PREFIX /usr/local/apache2
# WORKDIR "$HTTPD_PREFIX"

我注意到这里的/usr/local/apache2/conf/conf-available/dav.conf 是不是应该conf-enable,我映射/usr/local/apache2/conf/conf-enable/dav.conf 或者/usr/local/apache2/conf/conf-enable 都不行啊,然后/usr/local/apache2/conf/conf-enable/dav.conf 也不行

from docker-webdav.

wyxls avatar wyxls commented on August 23, 2024

@wyxls 感谢层主的方法,我之前在做覆盖的时候,直接从它的命令里面找的源路径conf/conf-available/dav.conf
结果依然被覆盖,看了你的回复才想起来要用绝对路径。

其实Dockerfile里有注释,httpd:alpine镜像拉取后默认workdir是/usr/local/apache2

# These variables are inherited from the httpd:alpine image:
# ENV HTTPD_PREFIX /usr/local/apache2
# WORKDIR "$HTTPD_PREFIX"

我注意到这里的/usr/local/apache2/conf/conf-available/dav.conf 是不是应该conf-enable,我映射/usr/local/apache2/conf/conf-enable/dav.conf 或者/usr/local/apache2/conf/conf-enable 都不行啊,然后/usr/local/apache2/conf/conf-enable/dav.conf 也不行

conf/conf-enable里的dav.conf是个软链接,实际文件是conf/conf-available/dav.conf
容器启动后会读取改动这个文件,单纯挂载覆盖还可能有权限问题,所以我个人最推荐的方法还是直接build image,这样更方便彻底一点

from docker-webdav.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.