Back

CSS doesn't render with reverse proxy.

  • 0
  • Self Hosted
  • General
Bio
28 Mar, 2024, 17:00

I have recently setup Appwrite for a project I am working on. However for some reason, my CSS will no longer render behind the reverse proxy. If i navigate straight to my instance, it will work but using the reverse proxy simply doesn't. Here is my NGINX location config:

TypeScript
location / {
        add_header          Strict-Transport-Security "max-age=31536000" always;
        add_header          X-Frame-Options deny;
        proxy_pass          http://localhost:5000;
        proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
        proxy_redirect      off;
        proxy_buffering     off;
        proxy_set_header    Host $host;
        proxy_set_header    X-Real-IP $remote_addr;
        proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
    }
TL;DR
Appwrite project's CSS doesn't render when behind a reverse proxy. The Nginx location config seems correct. Ensure the CSS file path is set correctly in the HTML, accounting for the proxy.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more