Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

michaeln1486's avatar

Issue with App_URL in Laravel + Vue + Vite

hi, I created a new app laravel version9.31.0 I also incorporated Vue js and tailwind css I found out a new technology called vite (have been long before i code) Now the issue is when i configure everything as required to run vue in welcome.blade.php and all the necessary configurations,

I run the command npm run dev

Gave me these links::

VITE v3.1.3 ready in 829 ms

➜ Local: http://127.0.0.1:5173/ ➜ Network: use --host to expose

LARAVEL v9.31.0 plugin v0.6.1

➜ APP_URL: http://localhost

now ehen i click the App_URL here, it send me to IIS in browser

  1. I have switched off IIS in cpanel and restarted my pc
  2. I have chcked the sercices.msc to see if World wide web is on but its not availabl;e

I have cleared cache from my application

I have npm-install afress

I have tried so many things but still loads IIS in browser

Questions:

  1. How can I stop IIS forever
  2. How can I configure the APP_URL to have a different url for example APP_URL = http://example.test

Please help me out. I have tried this for three hours and then I remembered you guys.

0 likes
1 reply
thinkverse's avatar

The APP_URL is set in your Laravel .env file, Vite doesn't actually use the APP_URL internally, it is only forwarded from your Laravel's environment configuration to give you a quick way to open your Laravel app.

It is used internally by Laravel itself though to for instance prefix generated URLs, so it should be set to the URL that your Laravel application is running on in that environment.

So if you use valet it should be your valet URL. If it's artisan serve it should be set to http://localhost:8080 or whatever port you've specified serve to use. For production it should be set on your web server to your actual website URL.

Please or to participate in this conversation.