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

Alphy Gacheru's avatar

visiting http://localhost/ after running ./vendor/bin/sail up shows the Apache2 Ubuntu Default Page instead of the laravel app

I'm using Linux and I already have docker compose installed.

After creating an application with curl -s https://laravel.build/example-app | bash, running ./vendor/bin/sail up and visiting http://localhost/ in the browser I see Apache2 Ubuntu Default Page instead of the new laravel app. How can I fix the issue?

Below is part of the output when I run ./vendor/bin/sail up

[+] Building 0.0s (0/0)                                                                                                                                                                                      
[+] Running 4/0
 ✔ Container example-app-meilisearch-1  Created                                                                                                                                                         0.0s 
 ✔ Container example-app-redis-1        Created                                                                                                                                                         0.0s 
 ✔ Container example-app-mailpit-1      Created                                                                                                                                                         0.0s 
 ✔ Container example-app-selenium-1     Created                                                                                                                                                         0.0s 
Attaching to example-app-laravel.test-1, example-app-mailpit-1, example-app-meilisearch-1, example-app-mysql-1, example-app-redis-1, example-app-selenium-1
0 likes
4 replies
awis's avatar

Did you find any way to solve this problem, I have encounter the same problem and searching for solution for this. It only occurs when using WSL2 on Windows to up the Docker, but it does not happen when I am using the Ubuntu desktop.

rvdiwas's avatar

@awis you already have apache server running on port 80. Either stop that process or listen to different port on sail. use APP_PORT=8080 in .env and restart sail again to run on localhost:8080

2 likes
taylor5392's avatar

I was using WSL2 and docker for my Laravel Sail setup and had the same problem showing the default Apache page. It was because WSL2 had Apache2 installed pre-installed and. I removed it with sudo apt remove apache2 and it was resolved.

Please or to participate in this conversation.