Grafana nginx reverse proxy page not loading when hitting direct 3000 port working fine

Please avoid posting in the Grafana parent category. Whenever possible choose a subcategory.

i am new to grafana and nginx can some one please help me all i want access my grafana on via nginx port 80 and getting below error , i have opened firwall port 80 and 3000 when i hit port 3000 from browser all working fine when hit via port 80 getting below error , can some one please help me i am trying to setup using this document Run Grafana behind a reverse proxy | Grafana Labs

my os RHEL 8
grafana version : * Grafana v7.5.11 (NA)

If you're seeing this Grafana has failed to load its application files

1. This could be caused by your reverse proxy settings.

2. If you host grafana under subpath make sure your grafana.ini root_url setting includes subpath. If not using a reverse proxy make sure to set serve_from_sub_path to true.

3. If you have a local dev build make sure you build frontend using: yarn start, yarn start:hot, or yarn build

4. Sometimes restarting grafana-server can help

5. Check if you are using a non-supported browser. For more information, refer to the list of supported browsers.

my settings is

nginx.conf

user ec2-user;
worker_processes auto;
include /etc/nginx/modules-enabled/*.conf;

events {
        worker_connections 768;
        multi_accept on;
}

http {

        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;
        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        ##
        # SSL Settings
        ##
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
        ssl_prefer_server_ciphers on;
        ##
        # Logging Settings
        ##
        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;
        ##
        # Gzip Settings
        ##

        gzip on;

        map $http_upgrade $connection_upgrade {
        default upgrade;
        '' close;
        }

        server {
	       listen 80;
 	       location /grafana {
                proxy_set_header Host $http_host;
                proxy_pass http://grafana.staged-by-discourse.com/;
              }

        # Proxy Grafana Live WebSocket connections.
        location /grafana/api/live {
            rewrite  ^/(.*)  /$1 break;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection $connection_upgrade;
            proxy_set_header Host $http_host;
            proxy_pass http://grafana.staged-by-discourse.com/;
        }
        }
}

my grafana.ini settings is below

[server]
http_port = 3000
protocol = http
domain = localhost
root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana
serve_from_sub_path = true

[security]
# default admin user, created on startup
admin_user = admin

# default admin password, can be changed before first start of grafana,  or in profile settings
admin_password = admin

[snapshots]
external_enabled = false

[users]

[auth.proxy]

[log]
mode = console

[alerting]
enabled = false

THANK YOU!!

~ the grafana team

see this: