0
我试图发送Apple推送通知。我可以从Python外壳发送:Apache无法访问证书文件
import apns
ns=apns.APNs(use_sandbox=True, cert_file="certs/C.pem", key_file="certs/C.pem")
ns.gateway_server.send_notification('TOKEN', apns.Payload(alert='hi'))
然而,当我尝试从网络服务器发送它,我得到了同样的错误,我会得到,如果我是没有访问的文件夹中的我certs
目录:
ssl.SSLError: [Errno 336265218] _ssl.c:356: error:140B0002:SSL routines:SSL_CTX_use_PrivateKey_file:system lib
我的主要项目文件夹在我的apache.conf文件:
<Directory /home/ubuntu/MyProject/Django/MyProject>
<Files *>
Order allow,deny
Allow from all
Require all granted
</Files>
</Directory>
的证书文件夹位于/home/ubuntu/MyProject/Django/MyProject/certs
。我将如何给Apache访问这个?