Darrenzzy commented on issue #30183:
URL: https://github.com/apache/superset/issues/30183#issuecomment-2446178745

   According to the configuration of Nginx in the Docker directory, there is no 
configuration directing static resources. It is recommended to make the 
following modifications:
   
   Steps:
   
   1.   Stop docker-compose first.
   
   2.   Edit nginx.conf:
             ```        vim docker/nginx/nginx.conf ```
   
   Add and modify the following content:
   ```
   
   server {
      listen 80 default_server;
      server_name  _;
   
      location /ws {
          proxy_pass http://superset_websocket;
          proxy_http_version 1.1;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection "Upgrade";
          proxy_set_header Host $host;
      }
      location /static {
               alias /app/superset-frontend/src;
               expires 30d;
               access_log off;
      }
   
      location / {
          proxy_pass http://superset_app;
          proxy_set_header    Host                $host;
          proxy_set_header    X-Real-IP           $remote_addr;
          proxy_set_header    X-Forwarded-For     $remote_addr;
          proxy_set_header    X-Forwarded-Host    $host;
          proxy_set_header    X-Forwarded-Proto   $scheme;
          proxy_http_version 1.1;
          port_in_redirect off;
          proxy_connect_timeout 300;
      }
   }
   ```
        
   3.  After making the changes, restart docker-compose:
   
   ```
   docker compose up
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to