Please wait ... page on linux server with apache2

I have tried with the following config files on my server which runs on ubuntu 20.04 with apche2.

<VirtualHost *:80>
    RewriteEngine on
    RewriteCond %{SERVER_NAME} =sub.domain.com
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<VirtualHost *:443>
   ServerName sub.domain.com

   RewriteEngine On
   RewriteCond %{HTTP:Upgrade} =websocket
   RewriteRule /(.*) ws://localhost:8501/$1 [P]
   RewriteCond %{HTTP:Upgrade} !=websocket
   RewriteRule /(.*) http://localhost:8501/$1 [P]
   ProxyPassReverse / http://localhost:8501

    SSLCertificateFile somepath
    SSLCertificateKeyFile someotherpath
</VirtualHost>

it prints “please wait…” and nothing else. I literally tried every method on the internet to solve this. any help here?
how can I diagnose this?
I have requirements.txt file in the directory with streamlit==1.10.0 in it.
also tried this link as well as many more.
thanks