XAMPP Apache will not start (port 80 or 443 in use)
Why Apache stops right after starting in XAMPP, and how to change its port or free port 80.
When Apache stops right after you start it in XAMPP, another program is almost always using port 80 or 443. You can free the port or move Apache to port 8080.
How to fix it
- In the XAMPP Control Panel, click Logs next to Apache. A line like “Port 80 in use by …” names the cause.
- Check the port with the tool below. Programs that often use port 80: IIS, the World Wide Web Publishing Service, another Apache, SQL Server Reporting Services. Port 443: VMware Workstation.
- Either stop that program, or change XAMPP: click Config, then Service and Port Settings, and set the main port to 8080 and SSL to 4433.
- Restart Apache and open http://localhost:8080.
Find what is using port 80
Run these in a terminal on your computer. Nothing is sent to this site.
Related problems and fixes
- MySQL shuts down unexpectedly
- Another MySQL service (for example MySQL80) already uses port 3306. Stop it in Services, or change the port in XAMPP.
- Installed in Program Files
- Windows permissions cause problems. Reinstall XAMPP in C:\xampp.
- After changing the port nothing opens
- Add the port to every address, such as localhost:8080/phpmyadmin.
Questions about XAMPP Apache not starting
- Why does Apache stop right after starting in XAMPP?
- Another program uses port 80 or 443. The Apache log in XAMPP names it.
- How do I change the Apache port in XAMPP?
- Open Config, then Service and Port Settings, set the main port to 8080, and open localhost:8080.
Config generators for this
- nginx PHP-FPM configRun a PHP site (WordPress, Laravel or plain PHP) on nginx with PHP-FPM.
- Apache virtual hostHost a website from a folder with Apache, with or without .htaccess.
- .htaccess fileBuild an Apache .htaccess file with an HTTPS redirect, www rules, compression, caching and a front controller.