der啊 SSL證書(shū)配置錯(cuò)誤導(dǎo)致寶塔控制面板“Apache”無(wú)法啟動(dòng)“TypeError: expected string or bytes-like object”(apache.py python3.7/re.py)
[重要通告]如您遇疑難雜癥,本站支持知識(shí)付費(fèi)業(yè)務(wù),掃右邊二維碼加博主微信,可節(jié)省您寶貴時(shí)間哦!
昨天深更半夜閑來(lái)沒(méi)屁事兒,想著把自己站點(diǎn)的證書(shū)更新一下,這特么的一更新,到今天才發(fā)現(xiàn)我站bjlaoliang.com掛了,臥槽啊,看到了是Apache掛了,無(wú)法啟動(dòng),咋啟動(dòng)都報(bào)錯(cuò)“Apache”無(wú)法啟動(dòng)“TypeError: expected string or bytes-like object” 如下面所示
Traceback (most recent call last):
File "/www/server/panel/BTPanel/__init__.py", line 1773, in publicObject
return run_exec().run(toObject, defs, get)
File "/www/server/panel/BTPanel/__init__.py", line 1721, in run
result = getattr(toObject,get.action)(get)
File "class/ajax.py", line 15, in GetApacheStatus
return a.GetApacheStatus()
File "class/apache.py", line 52, in GetApacheStatus
Uptime = re.search("ServerUptimeSeconds:\s+(.*)",result)
File "/www/server/panel/pyenv/lib/python3.7/re.py", line 185, in search
return _compile(pattern, flags).search(string)
TypeError: expected string or bytes-like object
找到了路徑里的文件,打開(kāi)看了一遍,也沒(méi)錯(cuò)誤啊,這錯(cuò)誤是哪里問(wèn)題,我想起來(lái)我之前有篇文章是針對(duì)python3.7的,但也沒(méi)啥問(wèn)題,就想著我特么的也沒(méi)干啥,難不成被人家入侵了,等我看了一圈,也沒(méi)問(wèn)題,就想起來(lái)是不是我昨天證書(shū)問(wèn)題導(dǎo)致的無(wú)法啟動(dòng)?
等我打開(kāi)我昨天部署證書(shū)的站點(diǎn),發(fā)現(xiàn)現(xiàn)實(shí)1122天,臥槽啊,明明就是90天的證書(shū),哪里有這么長(zhǎng)的時(shí)間,那就說(shuō)明是我部署錯(cuò)造成的,然后抓緊重新部署,部署完成后正常啟動(dòng),臥槽!
SSL證書(shū)里,_public.crt在上 _chain.crt在下就可以了;
臥槽,這一疏忽導(dǎo)致了站一天都沒(méi)打開(kāi);而且還特么的還想著到底哪里問(wèn)題,還修復(fù)了面板啥的都沒(méi)戲,臥槽,原來(lái)就這個(gè)小問(wèn)題導(dǎo)致的,真是狗!
問(wèn)題未解決?付費(fèi)解決問(wèn)題加Q或微信 2589053300 (即Q號(hào)又微信號(hào))右上方掃一掃可加博主微信
所寫(xiě)所說(shuō),是心之所感,思之所悟,行之所得;文當(dāng)無(wú)敷衍,落筆求簡(jiǎn)潔。 以所舍,求所獲;有所依,方所成!