Wave on production
I have a ubuntu 20.04 server and i configured NGINX andd PHP8. I clone my git project and then i did a "composer install". I created my .env file and to the "APP_ENV" section i put "production".
Then when i go live, my application just turn without nothing happened. but when i go back to my .env file and change the "APP_ENV" section to local, everything works fine. So i assume that laravel wave can't go production.
What can i do to solve this ?
Hi there,
Yes of course wave can run in production as well.
Can you clarify what exactly happens when you change the value in your env file?
I would recommend checking both your Nginx error long and the Laravel error log. Feel free to share the errors here so I can advise you further.
















Hi Bob,
thanks for your answers. so when i put
APP_ENV = production
APP_DEBUG = false
in my .env file and then i go to live, my app take like 1min to load and then it seems that there is no Css or Js file loaded. But whern i put
APP_ENV = local
APP_DEBUG = false
Everything works fine. I missed something.
In my NGINX log file i only have this
[08/Apr/2023:11:39:18 +0000] "GET / HTTP/1.1" 200 7667 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) Ap>
and in my laravel.log i have nothing
Hey!
Have you defined your APP_URL in the env file?
it needs to exactly match your domain name including the http or https, eg:
APP_URL=https://yourdomain.com
Let me know how it goes!
yes, mu APP_URL is define and it's exactly match with my domain
but it's the same
Can you try setting the env to production and then visit your domain in your browser and open the web console. In there you will see what path is used to load your static resources. Feel free to share a screenshot of the errors in the console.
this is what i got when i reload my page
nothing seems to happen
This is quite strange. If you wish DM me the login details to your server and I can take a look tomorrow morning!