Deploy to Apache

OK. For others who might face the same issue and try to solve it (and fail) by reading Django documents:

WSGIDaemonProcess omidshojaee python-home=/home/omid/websites/omidshojaee.com/venv python-path=/home/omid/websites/omidshojaee.com
WSGIProcessGroup omidshojaee
WSGIScriptAlias / /home/omid/websites/omidshojaee.com/website/wsgi.py

Must be outside <VirtualHost> ... </VirtualHost> block of Apache config file, otherwise certbot rewrite (from http to https) does not work.

My Django project is up and running.

Ahh…, the lightbulb comes on. What I see here is that you’ve defined your VirtualHost for port 80 only, but when the redirect occurs, the request is going to come back in on port 443. (Yep, I missed that.) So your redirected request coming in on port 443 is not going to match your VirtualHost setting.

I’m guessing it would work if you changed your VirtualHost setting to be

<VirtualHost *:80 *:443>

or just

<VirtualHost *>

to handle anything that Apache is listening on.