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

RushVan's avatar

APP_URL not working on fresh Windows Spark install

I am developing on a Windows machine running Xamp. Projects go in a folder structure like this;

 C:/xampp/htdocs/

This folder has some 20+ Laravel projects in it. They all run without issue. I have a project that needs Spark. I did the install with no issues or errors. However, all of the routes are throwing 404s. Typically I can get to a project like this;

  http://localhost/project_name/public

I have set APP_URL in .env and config/app.php to http://localhost. I have also tried to append '/' and '/project_name/public'. Nothing works. All the links (login, register, terms etc.) are pointing to http://localhost/link_name.

The only way I seem to be able to get it to work is to remove the leading '/' from the existing routes. Issue there is the register POST and other built in links in Kiosk etc would all need to be revised.

Clearly that's not the solution. However, I am stumped.

I have been able to get Spark running on my Mac. I posted the repo to git and pulled it down to my PC, same issue.

Any ideas what I can try next? Loving the Spark package concept but can't really enjoy it yet.

Thanks!

0 likes
5 replies
Cronix's avatar

I've seen this issue a lot with people using Spark v6 in the slack channel. I'm still on v5 and haven't had anything like this happen. If you have access to the Spark v6 repo on github.com/laravel/spark-aurelius , you might check the issues in there. I don't have access to that repo, but have access to the v1-5 repo and there are no reports of it in there.

One thing you can try is to actually set up a domain on your box for the app, like "myapp.test" in apache/nginx so you don't have to use urls like http://localhost/project_name/public. You could just set the app_url to myapp.test, which points to the public dir like a real host. It looks like it might fix it.

1 like
Snapey's avatar
Snapey
Best Answer
Level 122

I know you have lots of projects running in sub folders but thats pribably more luck than anything else.

You should really look at setting up apache virtual hosts so that you can point each to the public folder of the project. Coupled with editing of your hosts file to point local domains to each environment.

Its not too difficult to setup and then each route can resolve the root directory correctly

1 like
RushVan's avatar

@Snapey good idea. How do I deal with the Spark ssl? I have set up virtual host but the app is driving to https://.

RushVan's avatar

Oops, might be Chrome not Spark...stay tuned

RushVan's avatar

True story. .dev domain in Chrome requires https://. Force of habit. Used something else problem solved. Thanks @Snapey and @Cronix for the feedback.

Please or to participate in this conversation.