Error on ssl Creation django , Apache2, certbot

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: test-ssl4.demo.example.com

I ran this command: sudo certbot --apache -d test-ssl4.demo.example.com -d www.test-ssl4.demo.example.com

It produced this output: Could not reverse map the HTTPS VirtualHost to the original

My web server is (include version): Apache2

The operating system my web server runs on is (include version): Ubuntu 18.04

My hosting provider, if applicable, is: DigitalOcean

I can login to a root shell on my machine (yes or no, or I don’t know): yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):No

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot):certbot 0.31.0

My Conf File

<VirtualHost *:80>
ServerAdmin webmaster@example.com
DocumentRoot /srv/django/example2/src/example2/
ServerName test-ssl4.demo.example.com
ServerAlias www.test-ssl4.demo.example.com

<Directory /srv/django/example2/src/example2/example2>
       <Files "wsgi.py">
              Require all granted
       </Files>
</Directory>

Alias /static/ /srv/django/example2/src/example2/static/
<Directory /srv/django/example2/src/example2/static>
    Require all granted 
</Directory>
 
<Directory /srv/django/example2/src/example2/>
Order deny,allow    
Allow from all
AllowOverride All
</Directory>

#WSGIDaemonProcess example2 python-path=/srv/django/example2/src/example2:/srv/django/example2/venv/lib/python3.6/site-packages
#WSGIProcessGroup example2
#WSGIScriptAlias / /srv/django/example2/src/example2/example2/wsgi.py

ErrorLog ${APACHE_LOG_DIR}/example2_error.log
CustomLog ${APACHE_LOG_DIR}/example2_access.log combined

What’s the issue?
What’s your domain name?
What’s the error log?
What’s the overall output?
Are you sure Apache is the webserver serving contents? not Django?

1 Like

What’s the issue? : This error Happens “Could not reverse map the HTTPS VirtualHost to the original” when I run certbot commant

Domain : http://test-ssl4.demo.talrop.com/

What’s the overall output?:

Keeping the existing certificate
Could not reverse map the HTTPS VirtualHost to the original

IMPORTANT NOTES:

  • Unable to install the certificate
  • Congratulations! Your certificate and chain have been saved at:
    /etc/letsencrypt/live/test-ssl4.demo.talrop.com/fullchain.pem
    Your key file has been saved at:
    /etc/letsencrypt/live/test-ssl4.demo.talrop.com/privkey.pem
    Your cert will expire on 2020-08-24. To obtain a new or tweaked
    version of this certificate in the future, simply run certbot again
    with the “certonly” option. To non-interactively renew all of
    your certificates, run “certbot renew”

Are you sure Apache is the webserver serving contents? not Django?
Yes, I specify Django because i can able to add https on pure html sites with the same command.

Do you have a HTTPS virtual host for that domain?

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.