Skip to content
This repository has been archived by the owner on Mar 22, 2021. It is now read-only.

支持https后weblog无法记录curl #15

Open
ResidualLaugh opened this issue Mar 28, 2019 · 3 comments
Open

支持https后weblog无法记录curl #15

ResidualLaugh opened this issue Mar 28, 2019 · 3 comments

Comments

@ResidualLaugh
Copy link

由于目前用的是泛域名证书,只支持该域名及其二级域名,但是我们记录所用的域名是三级域名,curl https的时候会报证书错,那我尝试用http的进行请求,发现读不到页面。查看了项目里的setting.py才发现SECURE_SSL_REDIRECT = True,这个配置是使页面一直重定向到https的,所以http的拿不到页面,而https又由于三级域名不受证书保护的问题,无法直接访问到(需要忽略证书错误,或信任该站点)。所以当我修改了该配置为False之后,才能正常记录http的请求。如果要正常使用三级域名的话还得花钱买证书,算咯。。。

@howmp
Copy link
Contributor

howmp commented Mar 28, 2019

确认存在这个问题,目前如果只是自己用,先考虑使用如下命令,来申请三级域名证书。

let's encrypt证书是免费,可以通过-d参数增加要申请域名的证书

acme.sh --issue -d "*.xxx.com" -d "*.xxx.xxx.com" --dns dns_log --debug --dnssleep 10

@ResidualLaugh
Copy link
Author

嗯 谢谢,或许可以写成在创建用户的时候根据环境尝试自动配置nginx和ssl证书(或者产生配置文件),有时间的话我会试一下。

@howmp
Copy link
Contributor

howmp commented Mar 28, 2019

另外如果要想记录weblog的日志,可以使用url作为记录,如图

image

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

No branches or pull requests

2 participants