PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Question By
Unsolved

Wave on production

oupohchristian

Apr 8th, 2023 04:15 AM

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 ?

bobbyiliev

Apr 8th, 2023 04:29 AM

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.

Report
1
oupohchristian

Apr 8th, 2023 04:48 AM

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

bobbyiliev

Apr 8th, 2023 04:54 AM

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!

oupohchristian

Apr 8th, 2023 05:09 AM

yes, mu APP_URL is define and it's exactly match with my domain

but it's the same

bobbyiliev

Apr 8th, 2023 05:13 AM

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.

oupohchristian

Apr 8th, 2023 07:53 AM

this is what i got when i reload my page Capture d’écran 2023-04-08 à 16.50.24.png

nothing seems to happen

bobbyiliev

Apr 8th, 2023 07:55 AM

This is quite strange. If you wish DM me the login details to your server and I can take a look tomorrow morning!