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}
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

<VirtualHost *:443>

   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

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.