Hello everyone,
I'm hoping to get some help from the community or a staff member regarding two critical issues with my web app that are blocking my deployment. My username is xoxemo and the web app is configured for www.invictus-br.com.br.
Problem 1: Web App is Serving Stale/Outdated Files
The main issue is that my live website is not updating after I deploy new code. The browser continues to receive old versions of index.html, style.css, and script.js.
What I have done and verified:
My latest code is on the staging branch of my GitHub repository.
In the PythonAnywhere Bash console, I run cd ~/mysite followed by git reset --hard origin/staging. The command completes successfully and git status confirms that Your branch is up to date with 'origin/staging'.
Immediately after, I run cat ~/mysite/templates/index.html and I can confirm that the file on the disk is the new version with the latest changes.
I then click the "Reload" button on the Web tab.
Despite this, when I access the website (in an incognito window, with cleared cache), it still serves the old version of the interface. I have even tried URL versioning (style.css?v=2), and the old file is still served.
My hypothesis is that there is a very aggressive server-side cache (at the Nginx/proxy level) that is not being cleared by the "Reload" button.
Problem 2: SSL Certificate Failure (NET::ERR_CERT_COMMON_NAME_INVALID)
Related to the above, the SSL certificate for my custom domain is not being provisioned.
What I have done and verified:
My CNAME record for www is correctly configured at my domain registrar and has propagated globally (verified with dnschecker.org).
SSL Labs and curl -v both confirm that the server is presenting the generic *.pythonanywhere.com wildcard certificate, not a Let's Encrypt certificate for my custom domain. This is causing the "Not Secure" error in all browsers.
I have tried toggling "Force HTTPS" and reloading the web app multiple times over the last 12+ hours.
My Questions:
Has anyone in the community experienced such a persistent caching issue where the server serves old files even when the files on disk are up-to-date? Are there any other commands or tricks to force a hard cache purge?
For the PythonAnywhere staff: Could you please investigate my web app for a stuck SSL provisioning process and this potential caching bug? My project is completely blocked.
Thank you for any help or insight you can provide.