Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

我这边在安装以及使用中碰见了三个问题,还需要麻烦看下,谢谢 #14

Closed
YI-- opened this issue Apr 1, 2022 · 5 comments

Comments

@YI--
Copy link

YI-- commented Apr 1, 2022

环境:
joyqi/typecho:1.2.0-php7.4-apache
Debian GNU/Linux 10(Py3.7.9) 
Docker version 18.09.1, build 4c52b90

问题1:
在Linux中执行:
docker run --name typecho-server -p 6951:80 -e TYPECHO_SITE_URL=https://your-domain.com TYPECHO_USER_NAME=admin TYPECHO_USER_PASSWORD=admin -d joyqi/typecho:nightly-php7.4-apache
提示:
docker: invalid reference format: repository name must be lowercase. See 'docker run --help'.

问题2:
安装成功之后,提示最新版本为1.2.0;
image

问题3:
服务器 Nginx开启方向代理并开通的SSL;域名解析使用Cloudflare,并且使用其解析自动SSL代理服务;

  1. 在Typecho 站点地址 设置中配置url为 https:// xxx 时,前台页面展示是没有问题的的主url和资源url都是https,但是服务https://xxx/admin 时,资源url全是http,导致资源加载不了,在现代浏览器执行登录会被浏览器拦截;

已知:使用宿主机+端口,全程页面时没有被拦截的,因为都是http
已知:Cloudflare解析代理关闭下,还是存在同样问题
已知:纯http情况下无此问题

与其 #12 问题一致

谢谢!

@joyqi
Copy link
Member

joyqi commented Apr 1, 2022

第一个是你docker命令弄错了吧,多个环境变量要多次-e才行

第二个问题确实是个bug,已经在此修复 typecho/typecho#1356

第三个问题应该是经过反向代理后,系统没有识别https,你可以打开config.inc.php,并在最后一行加上

define('__TYPECHO_SECURE__', true);

@joyqi joyqi closed this as completed Apr 1, 2022
@kkkk24juastin
Copy link

加上define('TYPECHO_SECURE', true);之后,登录管理界面,输入密码之后会一闪,然后密码就消失了没办法登录。
这是日志:
[Tue May 9 21:54:03 2023] 8.130.11.204:45028 [200]: GET /admin/css/style.css?v=1.2.1
[Tue May 9 21:54:03 2023] 8.130.11.204:45028 Closing
[Tue May 9 21:54:03 2023] 8.130.11.204:45044 Accepted
[Tue May 9 21:54:03 2023] 8.130.11.204:45044 [200]: GET /admin/js/jquery.js?v=1.2.1
[Tue May 9 21:54:03 2023] 8.130.11.204:45046 Accepted
[Tue May 9 21:54:03 2023] 8.130.11.204:45044 Closing
[Tue May 9 21:54:03 2023] 8.130.11.204:45046 [200]: GET /admin/js/jquery-ui.js?v=1.2.1
[Tue May 9 21:54:03 2023] 8.130.11.204:45046 Closing
[Tue May 9 21:54:04 2023] 8.130.11.204:45052 Accepted
[Tue May 9 21:54:04 2023] 8.130.11.204:45052 [200]: GET /admin/img/typecho-logo.svg
[Tue May 9 21:54:04 2023] 8.130.11.204:45052 Closing
[Tue May 9 21:54:04 2023] 8.130.11.204:45048 Accepted
[Tue May 9 21:54:04 2023] 8.130.11.204:45048 [200]: GET /admin/js/typecho.js?v=1.2.1
[Tue May 9 21:54:04 2023] 8.130.11.204:45048 Closing
下面是截图:
image
点击登录之后,密码什么的就消失了
image

@gldl137
Copy link

gldl137 commented Sep 13, 2023

解决没

@Martinxux
Copy link

一样的问题,加了这个代码还是不行,而且评论也是有问题的。

@Martinxux
Copy link

不要加缓存

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants