404 Error in Livewire.js on Cleavr's NGINX Server: Directly Accessible but Not in Application

Hello Cleavr Team,

I am facing an issue when trying to load livewire.js in my Laravel application that uses Livewire, hosted on a Cleavr-managed NGINX server. Although I can access and view the source code of livewire.js by opening it in a new browser tab, the application itself does not process or find it, resulting in a 404 error.

Problem Details:

  • Error: 404 error when loading livewire.js , even though the file is directly accessible in the browser.
  • Environment: Laravel with Livewire on an NGINX server in Cleavr.
  • Error URL: https://my-domain.com/livewire/livewire.js

In your article about deploying Filament applications, you mention an option “Make NGINX compatible with Livewire”.

Inquiry:

Could you provide me with details on how to configure NGINX on Cleavr to correctly handle requests to livewire.js and resolve this 404 error? Are there specific steps or recommended adjustments in the NGINX configuration that I should follow? Any guidance on understanding why the file is accessible directly but not through the application would be very valuable.

Hello @Gonzalo2683,

Welcome to the Cleavr forum, and apologies for the delayed response.

I checked your Laravel site on Cleavr, and it appears to be functioning correctly from my end.

Are you still experiencing any issues? Please inform us if the problem persists, and we will investigate further. If you have already resolved the problem, kindly share the steps you took to fix it.

The error is no longer appearing. I deleted the existing site and created it again, this time selecting the Livewire option. I had previously attempted to configure NGINX manually without success. Upon reviewing the changes made by selecting the Livewire option, I noticed they were the same as what I had tried to do manually. However, for some unknown reason, my manual attempts had not been successful.