pyo0723
(JYP)
2018 年3 月 27 日 23:47
1
Could someone help me to get the image lightboxing working.
I uploaded a image. image resolution is 1772 x 2362.
But Images are without thumbnails and without lightboxes.
I checked create thumbnails option.
Settings part: File > create thumbnails
My Discourse is on private network. But we opened the firewall to connect from the outside.
Version is v2.0.0.beta5+12.
What is the problem?
2 个赞
pyo0723
(JYP)
2018 年3 月 28 日 10:01
3
Thank you for your reply.
I updated today to latest revision and already up to date.
and I tried safe mode.
but lightbox is not appearing no matter how I get the picture/image into the Post.
What shoud I do??
1 个赞
tshenry
(Taylor)
2018 年3 月 28 日 10:25
4
No problem. I wish I could help you more, but unfortunately, I do not have enough knowledge on the subject. Hopefully someone that knows more will respond soon. I would also watch the topic that I linked to. It might eventually have a solution posted.
In the mean time, you might want to take a look at your logs and see if there are similarities to the logs posted in that topic. I’m pretty sure the logs you would be interested in can be found by adding /logs to your forum’s base URL. So it would look something like https://example.com/logs The user in that topic also mentions a proxy. Are you using a proxy?
If you can provide this type of information, it should be helpful to someone that reads this topic and has a better understanding on the subject.
I wish you luck in solving the problem!
4 个赞
pyo0723
(JYP)
2018 年3 月 30 日 03:29
5
thank you tshenry.
our discourse is not using proxy and https.
I still do not know the cause of the problem.
Thank you. ^^
2 个赞
schungx
(Stephen Chung)
2018 年3 月 30 日 15:50
6
First thing first. If possible, upload that image to meta here. See if it works.
If it doesn’t work in meta, then it is much easier for the team to fix as there is their repo right here.
If it works in meta but not on your site, then there must be a setting conflict somewhere.
I can see that the image in your original post successfully lightboxes.
2 个赞
jomaxro
(Joshua Rosenfeld)
2018 年3 月 30 日 15:59
7
We’d prefer if you could upload to try first (try.discourse.org ), that way we don’t start getting image uploads all over the place. If the image fails to lightbox on try, then feel free to upload it here so the example doesn’t get deleted when try is reset each day. If the image lightboxes on try then the issue is specific to your configuration as @schungx stated.
4 个赞
我正在运行 2.5.0.beta6 版本,遇到了同样的问题。
“创建缩略图”已启用,但无论图片尺寸如何,都不会生成灯箱效果。
我有另一个 Discourse 实例,已经运行了几个月。在那里,旧帖子中的灯箱功能正常,但新帖子中则不行。
这是否可能是更新导致的问题?
如果我将同一张图片上传到 try.discourse.org ,灯箱功能在那里可以正常工作。
1 个赞
Johani
(Joe)
2020 年6 月 5 日 23:08
9
嘿,欢迎加入 Meta,@Michael_Uray
这表明您的设置中可能存在某些问题。能否请您检查浏览器控制台是否有错误,或者提供您遇到问题的网站链接?
5 个赞
我刚刚在一个上周搭建的新 Discourse 实例上创建了一个测试主题。
该图片分辨率为 1920x1050,但无法在灯箱中打开。
https://dis.ctb.co.at/t/test-image-lightbox/44
1 个赞
Johani
(Joe)
2020 年6 月 7 日 07:56
11
感谢分享链接,Michael
我在该页面上没有看到任何 JavaScript 错误。能否请你检查一下 Sidekiq 中是否存在问题?
your.site.com/sidekiq
特别是以下标签页:
另外,能否请你确认在搭建网站时已按照 官方指南 进行操作?
3 个赞
目前我这边没看到任何问题。
我确实遵循了该指南,但我修改了路径,并在 app.yml 文件中相应地进行了调整。
volumes:
- volume:
host: /var/docker/dis.ctb.co.at/shared/standalone
guest: /shared
- volume:
host: /var/docker/dis.ctb.co.at/shared/standalone/log/var-log
guest: /var/log
在第二次安装时,灯箱功能之前是正常工作的,当时的路径最初是 “/var/docker”,后来我将其更改到了其他位置。
灯箱问题可能是由于路径更改而引发的——我不太确定。
我是否可能遗漏了新路径的某些设置?
上面这些行是我找到的唯一指向原始目录 “/var/docker” 的行。
1 个赞
我刚刚尝试将其移回“/var/discourse”,以确认是路径更改导致了该问题,但使用原始路径时,该问题依然存在。
此外,它运行在 nginx 反向代理之后,由该代理处理 SSL 加密(如果这有相关影响的话)。不过,自从另一台安装停止工作以来,我并未更改该代理的任何配置。
我已在相应的 .yml 文件中为 nginx 进行了以下设置:
- replace:
filename: /etc/nginx/conf.d/discourse.conf
from: "types {"
to: |
set_real_ip_from 172.18.0.0/16;
real_ip_header X-Forwarded-For;
real_ip_recursive on;
types {
如果问题不是出在路径上,还有什么可能导致这个 lightbox 问题?
我已经将其移回 “/var/docker/dis.ctb.co.at”。
这是我当前的 yml 配置(仅修改了个人数据)。可能是那里有错误,还是这是 Discourse 的问题?
## 这是 Discourse Docker 容器的全功能独立模板
##
## 修改此文件后,您必须重新构建
## /var/discourse/launcher rebuild app
##
## 编辑时请 *非常* 小心!
## YAML 文件对空格或对齐的错误极其敏感!
## 如有需要,请访问 http://www.yamllint.com/ 验证此文件
templates:
- "templates/postgres.template.yml"
- "templates/redis.template.yml"
- "templates/web.template.yml"
- "templates/web.ratelimited.template.yml"
## 如果您想添加 Lets Encrypt (https),请取消注释这两行
# - "templates/web.ssl.template.yml"
# - "templates/web.letsencrypt.ssl.template.yml"
## 此容器应暴露哪些 TCP/IP 端口?
## 如果您希望 Discourse 与另一个 Web 服务器(如 Apache 或 nginx)共享端口,
## 请参阅 https://meta.discourse.org/t/17247 了解详情
expose:
# - "80:80" # http
# - "443:443" # https
- "127.0.0.1:3041:80"
docker_args:
- "--network=nginx-br"
params:
db_default_text_search_config: "pg_catalog.english"
## 将 db_shared_buffers 设置为总内存的最大 25%。
## 将根据检测到的 RAM 自动由 bootstrap 设置,您也可以覆盖
db_shared_buffers: "4096MB"
## 可以提高排序性能,但会增加每个连接的内存使用量
#db_work_mem: "40MB"
## 此容器应使用哪个 Git 修订版?(默认:tests-passed)
#version: tests-passed
env:
LANG: en_US.UTF-8
# DISCOURSE_DEFAULT_LOCALE: en
## 支持多少并发 Web 请求?取决于内存和 CPU 核心数。
## 将根据检测到的 CPU 自动由 bootstrap 设置,您也可以覆盖
UNICORN_WORKERS: 8
## TODO: 此 Discourse 实例将响应的域名
## 必填。Discourse 无法仅使用 IP 地址运行。
DISCOURSE_HOSTNAME: dis.ctb.co.at
## 如果您希望容器以与上述指定的相同的主机名(-h 选项)启动,请取消注释
## (默认 "$hostname-$config")
#DOCKER_USE_HOSTNAME: true
## TODO: 初始注册时将设为管理员和开发者的逗号分隔邮箱列表
## 示例:'user1@example.com,user2@example.com'
DISCOURSE_DEVELOPER_EMAILS: 'nothing@nothing.com'
## TODO: 用于验证新账户和发送通知的 SMTP 邮件服务器
# SMTP 地址、用户名和密码为必填项
# 警告:SMTP 密码中的字符 '#' 可能导致问题!
DISCOURSE_SMTP_ADDRESS: mailserver.nothing.com
DISCOURSE_SMTP_PORT: 25
DISCOURSE_SMTP_USER_NAME: nothing@nothing.com
DISCOURSE_SMTP_PASSWORD: "secret"
DISCOURSE_SMTP_ENABLE_START_TLS: false # (可选,默认为 true)
DISCOURSE_SMTP_OPENSSL_VERIFY_MODE: none
## 如果您添加了 Lets Encrypt 模板,请取消注释以下行以获取免费 SSL 证书
# LETSENCRYPT_ACCOUNT_EMAIL: me@example.com
## 此 Discourse 实例的 http 或 https CDN 地址(配置为拉取)
## 请参阅 https://meta.discourse.org/t/14857 了解详情
#DISCOURSE_CDN_URL: https://discourse-cdn.example.com
VIRTUAL_HOST: dis.ctb.co.at
VIRTUAL_PORT: 9002
LETSENCRYPT_HOST: dis.ctb.co.at
LETSENCRYPT_EMAIL: nothing@nothing.com
## Docker 容器是无状态的;所有数据都存储在 /shared 中
volumes:
- volume:
host: /var/docker/dis.ctb.co.at/shared/standalone
guest: /shared
- volume:
host: /var/docker/dis.ctb.co.at/shared/standalone/log/var-log
guest: /var/log
## 插件放在这里
## 请参阅 https://meta.discourse.org/t/19157 了解详情
hooks:
after_code:
- exec:
cd: $home/plugins
cmd:
- git clone https://github.com/discourse/docker_manager.git
## 构建后运行的任何自定义命令
run:
- exec: echo "开始自定义命令"
## 如果您想设置首次注册的“发件人”邮箱地址,请取消注释并修改:
## 收到首次注册邮件后,请重新注释该行。它只需运行一次。
#- exec: rails r "SiteSetting.notification_email='info@unconfigured.discourse.org'"
- exec: echo "结束自定义命令"
- replace:
filename: /etc/nginx/conf.d/discourse.conf
from: "types {"
to: |
set_real_ip_from 172.18.0.0/16;
real_ip_header X-Forwarded-For;
real_ip_recursive on;
types {
我现在明白了,只有当创建包含图片的帖子时启用了“强制您的站点仅使用 HTTPS”选项,才会出现这种情况。
我在另一台安装上一开始就启用了该选项,但它突然停止工作,可能是由于 nginx 或 Discourse 的更新导致的。
据我所见,nginx 日志中并未显示任何异常。
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:09:52 +0200] "POST /message-bus/d333cb718e2d49b9947ec22c0762e47d/poll HTTP/2.0" 200 2 "https://dis.ctb.co.at/t/test-image-lightbox/44/7" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:09:58 +0200] "POST /presence/publish HTTP/2.0" 200 36 "https://dis.ctb.co.at/t/test-image-lightbox/44/6" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:09:58 +0200] "POST /message-bus/d333cb718e2d49b9947ec22c0762e47d/poll HTTP/2.0" 200 253 "https://dis.ctb.co.at/t/test-image-lightbox/44/6" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:09:58 +0200] "POST /uploads.json?client_id=d333cb718e2d49b9947ec22c0762e47d HTTP/2.0" 200 431 "https://dis.ctb.co.at/t/test-image-lightbox/44/6" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:00 +0200] "POST /draft.json HTTP/2.0" 200 56 "https://dis.ctb.co.at/t/test-image-lightbox/44/6" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:08 +0200] "POST /message-bus/d333cb718e2d49b9947ec22c0762e47d/poll HTTP/2.0" 200 253 "https://dis.ctb.co.at/t/test-image-lightbox/44/6" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:08 +0200] "POST /presence/publish HTTP/2.0" 200 36 "https://dis.ctb.co.at/t/test-image-lightbox/44/6" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:16 +0200] "POST /draft.json HTTP/2.0" 200 56 "https://dis.ctb.co.at/t/test-image-lightbox/44/6" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:18 +0200] "POST /draft.json HTTP/2.0" 200 56 "https://dis.ctb.co.at/t/test-image-lightbox/44/6" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:19 +0200] "POST /message-bus/d333cb718e2d49b9947ec22c0762e47d/poll HTTP/2.0" 200 251 "https://dis.ctb.co.at/t/test-image-lightbox/44/6" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:19 +0200] "POST /presence/publish HTTP/2.0" 200 36 "https://dis.ctb.co.at/t/test-image-lightbox/44/6" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:19 +0200] "POST /message-bus/d333cb718e2d49b9947ec22c0762e47d/poll HTTP/2.0" 200 194 "https://dis.ctb.co.at/t/test-image-lightbox/44/6" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:19 +0200] "POST /posts HTTP/2.0" 200 733 "https://dis.ctb.co.at/t/test-image-lightbox/44/6" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:21 +0200] "POST /message-bus/2027eab545f744e3a8dff7e81e4748d4/poll?dlp=t HTTP/2.0" 200 258 "https://dis.ctb.co.at/admin/site_settings/category/security?filter=" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:22 +0200] "POST /message-bus/d333cb718e2d49b9947ec22c0762e47d/poll HTTP/2.0" 200 336 "https://dis.ctb.co.at/t/test-image-lightbox/44/7" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:22 +0200] "GET /posts/82 HTTP/2.0" 200 749 "https://dis.ctb.co.at/t/test-image-lightbox/44/7" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:22 +0200] "GET /about/live_post_counts.json HTTP/2.0" 200 52 "https://dis.ctb.co.at/t/test-image-lightbox/44/7" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:24 +0200] "POST /message-bus/2027eab545f744e3a8dff7e81e4748d4/poll?dlp=t HTTP/2.0" 200 33 "https://dis.ctb.co.at/admin/site_settings/category/security?filter=" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:27 +0200] "POST /topics/timings HTTP/2.0" 200 0 "https://dis.ctb.co.at/t/test-image-lightbox/44/7" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nnginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:47 +0200] "POST /message-bus/d333cb718e2d49b9947ec22c0762e47d/poll HTTP/2.0" 200 2 "https://dis.ctb.co.at/t/test-image-lightbox/44/7" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
nginx | nginx.1 | dis.ctb.co.at 84.115.50.36 - - [14/Jun/2020:16:10:47 +0200] "POST /message-bus/d333cb718e2d49b9947ec22c0762e47d/poll HTTP/2.0" 200 104 "https://dis.ctb.co.at/t/test-image-lightbox/44/7" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"
顺便提一下,日志中的 nnginx 并非拼写错误,不知为何确实显示为这样。
是否有人知道“强制您的站点仅使用 HTTPS”为何会导致灯箱出现问题?
1 个赞
根据我的经验,这通常是由于复杂的反向代理方案配置不当所致。子目录会增加额外的复杂性(以及变量)。
嗯,我的 nginx 代理配置可能哪里出了问题?
version: '3'
services:
nginx:
image: jwilder/nginx-proxy:alpine
labels:
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true"
container_name: nginx
networks:
- nginx_nw
ports:
- 80:80
- 443:443
volumes:
- ./data/conf.d:/etc/nginx/conf.d:rw
- ./data/vhost.d:/etc/nginx/vhost.d:rw
- ./data/html:/usr/share/nginx/html:rw
- ./data/certs:/etc/nginx/certs:ro
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
restart: unless-stopped
letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: letsencrypt
depends_on:
- nginx
networks:
- nginx_nw
volumes:
- ./data/certs:/etc/nginx/certs:rw
- ./data/vhost.d:/etc/nginx/vhost.d:rw
- ./data/html:/usr/share/nginx/html:rw
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: unless-stopped
networks:
nginx_nw:
external:
name: nginx-br
我通过该 nginx 代理运行了两个独立的 Discourse 安装实例,以及一个 Nextcloud 实例。在第一个 Discourse 安装中,灯箱(lightbox)之前一直正常工作,但突然就失效了。实际上,自它正常工作以来,我并未对代理配置进行任何更改。
有趣的是,即使我已将卷(volumes)设置指向其他目录,它仍然会在 /var/discourse 下创建一些文件和文件夹。
volumes:
- volume:
host: /var/docker/dis.ctb.co.at/shared/standalone
guest: /shared
- volume:
host: /var/docker/dis.ctb.co.at/shared/standalone/log/var-log
guest: /var/log
所以我认为问题可能出在文件夹路径的某个地方。
root@dk1:/var/discourse# tree -d
.
└── shared
└── standalone
├── backups
├── log
│ ├── rails
│ └── var-log
│ ├── nginx
│ ├── postgres
│ └── redis
├── postgres_backup
├── postgres_data
│ ├── base
│ │ ├── 1
│ │ ├── 14049
│ │ ├── 14050
│ │ └── 16384
│ ├── global
│ ├── pg_commit_ts
│ ├── pg_dynshmem
│ ├── pg_logical
│ │ ├── mappings
│ │ └── snapshots
│ ├── pg_multixact
│ │ ├── members
│ │ └── offsets
│ ├── pg_notify
│ ├── pg_replslot
│ ├── pg_serial
│ ├── pg_snapshots
│ ├── pg_stat
│ ├── pg_stat_tmp
│ ├── pg_subtrans
│ ├── pg_tblspc
│ ├── pg_twophase
│ ├── pg_wal
│ │ └── archive_status
│ └── pg_xact
├── postgres_run
│ └── 12-main.pg_stat_tmp
├── redis_data
├── state
│ ├── anacron-spool
│ └── logrotate
├── tmp
│ ├── backups
│ └── restores
└── uploads
└── default
├── optimized
│ └── 1X
└── original
└── 1X
52 directories
我是否可能遗漏了针对新文件夹路径的某个设置?
从未发生过在 /var/discourse 中创建文件的情况,也许我只是看到了一些旧文件。
我现在已从 nginx 切换到 traefik,以确认问题并非出在 nginx 上,但问题仍然存在。这意味着问题很可能出在 Discourse 端,而不是代理端。
在 traefik 的情况下情况相同:如果在发布图片时禁用了“强制 HTTPS”,那么灯箱功能可以正常工作,即使之后我重新启用了“强制 HTTPS”。
我还可以检查其他哪些方面?
日志文件中显示了一个错误,提示无法访问 /uploads/....。
无法访问 '/uploads/default/original/1X/fe2af548af4a22f4802ddaa54afa557ae557417c.png' 以获取其尺寸。
如果我在浏览器中直接输入该 URL,可以正常访问图片:
https://domain.com/uploads/default/original/1X/fe2af548af4a22f4802ddaa54afa557ae557417c.png
Completed 200 OK in 23ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 3000)
Completed 200 OK in 318ms (Views: 1.2ms | ActiveRecord: 0.0ms | Allocations: 50347)
无法访问 '/uploads/default/original/1X/fe2af548af4a22f4802ddaa54afa557ae557417c.png' 以获取其尺寸。
Started GET "/posts/96" for 84.115.50.36 at 2020-07-04 14:15:14 +0000
Processing by PostsController#show as JSON
Parameters: {"id"=>"96"}
如果不强制使用 HTTPS,则不会显示错误。
Completed 200 OK in 18ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 3050)
Completed 200 OK in 296ms (Views: 0.5ms | ActiveRecord: 0.0ms | Allocations: 49562)
Started GET "/posts/97" for 84.115.50.36 at 2020-07-04 14:17:43 +0000
Processing by PostsController#show as JSON
Parameters: {"id"=>"97"}
看起来 Discourse 出于某种原因再次从 Web 服务器下载了图片,以便进行灯箱(lightbox)处理。
如果我在 Discourse Docker 容器内手动下载该图片,它会尝试通过内部 IP 地址直接访问 Web 服务器,而不是通过代理。这种方式可以通过 HTTP 访问,但无法通过 HTTPS 访问。
I am having the same issue.
Can't reach '/uploads/default/original/1X/fe2af548af4a22f4802ddaa54afa557ae557417c.png' to get its dimension.
I can access the picture from the outside, but not within the Docker image.
root@dk1-dis:/shared/log/rails# wget https://dis.domain.com/uploads/default/original/1X/b2ef855c010c044aee13177269baaa36453c6193.png
--2020-07-04 14:53:33-- https://dis.domain.com/uploads/default/original/1X/b2ef855c010c044aee13177269baaa36453c6193.png
Resolving dis.domain.com (dis…
Web 服务器本身仅提供 HTTP 访问,但 Discourse 尝试通过 HTTPS 访问,导致失败。
我不明白为什么 Discourse 要再次从 Web 服务器下载图片,而不是在内部直接访问(无需 HTTP/HTTPS)。
编辑: 我发现,我将 app.yml 重命名为 domain.name.yml,这导致 Docker 将 domain.name 的 DNS 名称更改为其内部 IP 地址。我将其改回 domain_name.yml 后,一切恢复正常。
1 个赞
Stephen
(Stephen)
2020 年7 月 4 日 20:32
21
如果 YAML 中的双点导致了这个问题,听起来这应该是启动器中应该抛出警告的情况?
2 个赞