livewire / flux

The official Livewire UI component library
https://fluxui.dev
495 stars 41 forks source link

404 error for flux.js and flux.css on nginx #50

Closed mauritskorse closed 1 month ago

mauritskorse commented 2 months ago

When trying to deploy on my nginx server I noticed that it had the same issue as livewire, so I had to add the following to my nginx.conf to make it work. Might be good to add it to the docs.

    location ~ ^/flux/flux(\.min)?\.(js|css)$ {
        expires off;
        try_files $uri $uri/ /index.php?$query_string;
    }
patrykszady commented 2 months ago

I don't know how related this is but in dev i had to php artisan optimize:clear and composer dump-autoload and my problems with 404 error for flux.js and flux.css went away. Haven't deployed to production yet however.

schonhoff commented 1 month ago

I have the same problem. I'm using Laravel Forge with envoyer. The file shows a 404 error in the console but when I'm opening the path, the file is correctly shown. I don't get what is wrong. Working with the nginx config mentioned above doesn't give me the expected result :-(

schonhoff commented 1 month ago

I fixed it with the NGINX config on Forge. I just needed to delete my Cloudflare cache... Maybe it is worth mentioning this in the docs aswell?

calebporzio commented 1 month ago

Thanks for this. Just added a new section to the installation docs to clear this up for people (we have a similar section in the Livewire docs as well): https://fluxui.dev/docs/installation#configuring-nginx