Deployed app on EC2 via Apache reverse proxy stuck on "Please wait..."

Here’s my Apache configuration:

<VirtualHost *:80>
        ProxyPreserveHost On
        ProxyRequests Off
        ServerName beatmap.pmeal.com
        # ServerAlias pmeal.com
        ProxyPass / http://127.0.0.1:8501/
        ProxyPassReverse / http://127.0.0.1:8501/

        ErrorLog ${APACHE_LOG_DIR}/beatmap_pmeal_com_error.log
        CustomLog ${APACHE_LOG_DIR}/beatmap_pmeal_com_access.log combined
</VirtualHost>

I’ve already tried running the app with --server.enableCORS=false and --server.enableWebsocketCompression=false, but they didn’t work.

I’d really appreciate it if someone could help me out as I’m stuck, having no clue how to proceed.

Please let me know if you need more info. Thanks!

Update: I tried adding the following rule and it worked:

sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8501

However, now everything points to the streamlit app, which is not what I wanted. I have my personal website (Wordpress) hosted on the same EC2 instance. Is there a way around it?