Search code examples
sslweb2py

How to use the Comodo certificate in Web2py?


When using web2py, it asks a single ssl certificate file.

But what I got from Comodo are two files, one .crt file and one .ca-bundle file.

I tried with using only provide the .crt file when setting up web2py, in the beginning it works. But when I go to my website another day, it shows "This certificate cannot be verified up to a trusted certification authority."

My suspicion is that this is related to the case of not using the .ca-bundle file. So anyone knows how to use both files in web2py settings?


Solution

  • Finally got it working!

    It turns out to be the Web2py 'One step production deployment' script is not complete. It leaves out the 'SSLCertificateChainFile' option when it configures the Apache server.

    So by adding this line:

    SSLCertificateChainFile = path_to_your_ca-bundle_file

    Below the line 'SSLCertificateKeyFile /etc/apache2/ssl/self_signed.key' will do the work.