How to fix the error where Apache cannot start on port 80 in XAMPP

VPTS Team Content has been moderated
Published date:4/4/2025 Update:4/4/2025 Views:171 Reviews: 4.8/5161reviews
VPTS on

While using XAMPP to develop websites or run a local environment, many users have encountered the error where Apache cannot start because port 80 is occupied. This error seems...

While using XAMPP to develop websites or run a local environment, many users have encountered the error where Apache cannot start because port 80 is occupied. This error seems simple, but causes considerable trouble, especially for those who need to quickly deploy a website or coding environment for testing. When Apache does not run, projects stall, and all progress is affected.

Understanding that, this article will help you identify the cause, check what is occupying port 80, and guide you step by step to fix the error in a simple, easy-to-follow manner without requiring advanced technical skills.

However, quite a few users still run into common troubles such as:

  • Do not know how to check which port is occupied.
  • Unsure which software is using port 80.
  • Do not know where to reconfigure Apache in XAMPP.
  • Worry that making a mistake will prevent Apache from running altogether.

Don't worry, everything will beVPTSanswered in this article! With detailed instructions, you will quickly resolve the error and restart Apache in just a few minutes – whether the port is occupied or not!

Illustration How to fix the error unable to start Apache on port 80 in XAMPP

1. Causes of XAMPP Apache Errors

There are several causes for this error, the most common being:
  • Port 80 occupied by another application, such as Skype, IIS (Internet Information Services), VMware, TeamViewer...
  • Did not run XAMPP with Administrator privileges, causing Apache not to have sufficient permissions to use the system port.
  • Misconfigured httpd.conf or httpd-ssl.conf file(duplicate ports, syntax errors…).
  • Firewall or antivirus software blocking the connectionport 80 or prevent Apache from running.
  • Apache is running in the background, causing conflicts when restarting from XAMPP.

2. Guide to Fixing Apache Occupying Port 80 Error

Step 1: Identify that XAMPP is experiencing a port error

When Apache fails to start, XAMPP displays an error message directly in the Control Panel. The symptoms include:
  • Notification line: "Apache shutdown unexpectedly."
  • Accompanied by descriptions such as:""This may be due to a blocked port, missing dependencies, improper privileges, a crash, or a shutdown by another method."
Illustration Interface identifying Port 80 error
Port 80 error identification interface

Step 2: Check the application occupying port 80

After identifying that Apache cannot start, the next step is to check which application is occupying port 80—the main cause of the error.

Execution steps:

  • On the XAMPP interface, click the Services button (gear icon) to open the list of services running on the system.
  • In the Services window, scroll down and find the service named World Wide Web Publishing Service.
If you see this service in the Running state and its Startup Type is Automatic, it is very likely the culprit occupying port 80 and causing a conflict with Apache.
Illustration Interface identifying Port 80 error via World Wide Web Publishing service
Port 80 error identification interface via World Wide Web Publishing service

Step 3: Stop the service occupying port 80 so Apache can start

After confirming that the World Wide Web Publishing Service (part of IIS) is occupying port 80, you need to completely stop this service to free up the port for Apache in XAMPP.

 Execution steps:

  1. In the Services window, find the row named World Wide Web Publishing Service.

  2. Right-click on that service → select Stop to stop the service immediately.

  3. Right-click once more → select Properties.

  4. In Startup type, change it back to Disabled → click OK.

Note:If you cannot find the “World Wide Web Publishing Service”, the system might not have IIS installed. In that case, the port 80 conflict may come from another application such as Skype, TeamViewer, VMware...

Illustration World Wide Web Publishing Service installation interface
Installation screen for World Wide Web Publishing Service
Illustration Stopping the service occupying port 80.
Stopping the service occupying port 80.

Step 4: Re-check Apache operation

After completely stopping the World Wide Web Publishing Service (part of IIS)—the primary cause of port 80 occupancy—return to XAMPP to restart Apache.
  • Click the Start button next to Apache in XAMPP Control Panel.
  • If everything was handled properly, Apache will switch to running status in green as illustrated.
Illustration Select Start to enable Apache
Select Start to enable Apache
Illustration of Apache starting successfully after port 80 was freed
Apache started successfully after port 80 was freed

Conclusion

Thus, in just 4 simple steps, you can resolve the issue of Apache failing to start due to port 80 conflicts on XAMPP quickly and effectively. Understanding the exact cause and applying proper actions saves time and ensures your web development workflow remains seamless and uninterrupted.

AtVPTS, we always accompany you on the journey of building and operating systems—from supporting development tools like XAMPP and NetBeans to optimized VPS solutions tailored for developers. If you are experiencing difficulties in deploying local environments or need a stable operating server, do not hesitate to contact our technical team for dedicated support.

If you are looking for a quality, high-speed VPS provider with 24/7 support ready to handle any technical issue – VPTS is the reliable choice for you.

Wishing you a successful Apache startup and productive project development with XAMPP!

VPTS – Comprehensive Digital Infrastructure Solutions Provider

VPTS is a digital infrastructure solution provider in Vietnam, serving deployment, operation, and data storage needs for individuals, developers, and enterprises. The service ecosystem includesVietnam VPS, International VPS, VPS Anti DDoS, Hosting cPanel, dedicated server, Rack rental, Proxy IPv4/IPv6, S3 MinIOandCloud Storage.

Besides providing infrastructure resources, VPTS also focuses on assisting customers with deployment, configuration, and practical troubleshooting. Content on the VPTS Blog is drawn from common scenarios in operating VPS, servers, and online systems, helping readers understand root causes and apply clear solutions.

VPTS – Stable infrastructure, flexible solutions, and continuous partnership throughout operations.

VPTS Team Contact Information