{"id":343,"date":"2025-06-17T07:48:26","date_gmt":"2025-06-17T02:18:26","guid":{"rendered":"https:\/\/griffso.com\/blogs\/?p=343"},"modified":"2025-06-17T07:48:40","modified_gmt":"2025-06-17T02:18:40","slug":"fix-xampp-apache-port-80-in-use-or-port-conflict-error-windows-macos-linux","status":"publish","type":"post","link":"https:\/\/griffso.com\/blogs\/fix-xampp-apache-port-80-in-use-or-port-conflict-error-windows-macos-linux\/","title":{"rendered":"Fix XAMPP Apache Port 80 in Use or Port Conflict Error (Windows\/macOS\/Linux)"},"content":{"rendered":"\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong> Fix XAMPP Apache Port 80 in Use or Port Conflict Error<\/strong><\/h2>\n\n\n\n<p>Getting a \u201cPort 80 in use\u201d error in XAMPP? Here\u2019s how to solve Apache port conflicts on Windows, macOS, and Linux\/Ubuntu in easy steps.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83e\udde9 <strong>Introduction<\/strong><\/h3>\n\n\n\n<p>XAMPP often fails to start Apache because <strong>Port 80 (HTTP)<\/strong> is already used by another application. This is one of the most common issues when working with local servers.<\/p>\n\n\n\n<p>In this guide, we\u2019ll show you how to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Identify what\u2019s using Port 80<\/li>\n\n\n\n<li>Change Apache\u2019s port<\/li>\n\n\n\n<li>Fix the issue on <strong>Windows<\/strong>, <strong>macOS<\/strong>, and <strong>Linux\/Ubuntu<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u2757 What Causes It?<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Skype, IIS, Docker, VMware, or even antivirus software using Port 80<\/li>\n\n\n\n<li>Apache not shutting down cleanly<\/li>\n\n\n\n<li>Firewall\/antivirus blocking ports<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udda5\ufe0f <strong>Fix on Windows<\/strong><\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">\u2705 Option 1: Find What\u2019s Using Port 80<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open <strong>Command Prompt<\/strong> as Administrator: <code>netstat -aon | findstr :80<\/code><\/li>\n\n\n\n<li>Note the <strong>PID<\/strong> (Process ID).<\/li>\n\n\n\n<li>Run: <code>tasklist | findstr [PID]<\/code> Replace <code>[PID]<\/code> with the number from the previous command.<\/li>\n\n\n\n<li>Close the program or disable the service using it (e.g., Skype, IIS).<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">\u2705 Option 2: Change Apache\u2019s Port<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to XAMPP Control Panel > Apache > <strong>Config > httpd.conf<\/strong><\/li>\n\n\n\n<li>Find: <code>Listen 80<\/code> and change to: <code>Listen 8080<\/code><\/li>\n\n\n\n<li>Also change: <code>ServerName localhost:80<\/code> to: <code>ServerName localhost:8080<\/code><\/li>\n\n\n\n<li>Save and close.<\/li>\n\n\n\n<li>Update <strong>httpd-ssl.conf<\/strong> (if needed):\n<ul class=\"wp-block-list\">\n<li>Change: <code>Listen 443<\/code> to: <code>Listen 4433<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Restart Apache.<\/li>\n\n\n\n<li>Access XAMPP via: <code>http:\/\/localhost:8080<\/code><\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83c\udf4f <strong>Fix on macOS<\/strong><\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">\u2705 Check Port Usage<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open Terminal: <code>sudo lsof -i :80<\/code><\/li>\n\n\n\n<li>Identify the process name (e.g., httpd, nginx, Skype).<\/li>\n\n\n\n<li>Kill the process (if safe): <code>sudo kill -9 [PID]<\/code><\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\">\u2705 Change Apache Port<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open: <code>sudo nano \/Applications\/XAMPP\/xamppfiles\/etc\/httpd.conf<\/code><\/li>\n\n\n\n<li>Change: <code>Listen 80<\/code> to: <code>Listen 8080<\/code><\/li>\n\n\n\n<li>Change: <code>ServerName localhost:80<\/code> to: <code>ServerName localhost:8080<\/code><\/li>\n\n\n\n<li>Restart Apache: <code>sudo \/Applications\/XAMPP\/xamppfiles\/xampp restartapache<\/code><\/li>\n\n\n\n<li>Visit: <code>http:\/\/localhost:8080<\/code><\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udc27 <strong>Fix on Linux\/Ubuntu<\/strong><\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">\u2705 Check Port Usage<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo netstat -tuln | grep :80\n<\/code><\/pre>\n\n\n\n<p>OR<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo lsof -i :80\n<\/code><\/pre>\n\n\n\n<p>Kill the process:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo kill -9 &#91;PID]\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u2705 Change Apache Port<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Edit Apache config: <code>sudo nano \/opt\/lampp\/etc\/httpd.conf<\/code><\/li>\n\n\n\n<li>Update: <code>Listen 8080 ServerName localhost:8080<\/code><\/li>\n\n\n\n<li>Restart Apache: <code>sudo \/opt\/lampp\/lampp restart<\/code><\/li>\n\n\n\n<li>Visit: <code>http:\/\/localhost:8080<\/code><\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 Bonus Tip: Auto-Redirect to New Port<\/h3>\n\n\n\n<p>If you&#8217;re using port 8080, create a browser bookmark for:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>http:&#47;&#47;localhost:8080\/dashboard\/\n<\/code><\/pre>\n\n\n\n<p>You can also use <code>.htaccess<\/code> to redirect from <code>\/<\/code> to the correct port or add a shortcut in your IDE.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udccc Conclusion<\/h3>\n\n\n\n<p>The \u201cPort 80 in use\u201d error is annoying but very common. With the steps above, you can either free up the port or simply reconfigure Apache to use an alternate port on any platform.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udcac Got a Different Port Issue?<\/h3>\n\n\n\n<p>Comment with your port conflict or system logs and I\u2019ll help you solve it!<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n<div class=\"pld-like-dislike-wrap pld-template-1\">\n    <div class=\"pld-like-wrap  pld-common-wrap\">\n    <a href=\"javascript:void(0)\" class=\"pld-like-trigger pld-like-dislike-trigger  \" title=\"\" data-post-id=\"343\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-already-liked=\"0\">\n                        <i class=\"fas fa-thumbs-up\"><\/i>\n                <\/a>\n    <span class=\"pld-like-count-wrap pld-count-wrap\">    <\/span>\n<\/div><div class=\"pld-dislike-wrap  pld-common-wrap\">\n    <a href=\"javascript:void(0)\" class=\"pld-dislike-trigger pld-like-dislike-trigger  \" title=\"\" data-post-id=\"343\" data-trigger-type=\"dislike\" data-restriction=\"cookie\" data-already-liked=\"0\">\n                        <i class=\"fas fa-thumbs-down\"><\/i>\n                <\/a>\n    <span class=\"pld-dislike-count-wrap pld-count-wrap\"><\/span>\n<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Fix XAMPP Apache Port 80 in Use or Port Conflict Error Getting a \u201cPort 80 in use\u201d error in XAMPP? Here\u2019s how to solve Apache port conflicts on Windows, macOS, and Linux\/Ubuntu in easy steps. \ud83e\udde9 Introduction XAMPP often fails to start Apache because Port 80 (HTTP) is already used by another application. This is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-343","post","type-post","status-publish","format-standard","hentry","category-coding-help-programming-tips-code-examples-coding-resources-debug-guide-software-development-learn-to-code-coding-best-practices-coding-challenges-coding-tutorials"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/griffso.com\/blogs\/wp-json\/wp\/v2\/posts\/343","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/griffso.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/griffso.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/griffso.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/griffso.com\/blogs\/wp-json\/wp\/v2\/comments?post=343"}],"version-history":[{"count":1,"href":"https:\/\/griffso.com\/blogs\/wp-json\/wp\/v2\/posts\/343\/revisions"}],"predecessor-version":[{"id":344,"href":"https:\/\/griffso.com\/blogs\/wp-json\/wp\/v2\/posts\/343\/revisions\/344"}],"wp:attachment":[{"href":"https:\/\/griffso.com\/blogs\/wp-json\/wp\/v2\/media?parent=343"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/griffso.com\/blogs\/wp-json\/wp\/v2\/categories?post=343"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/griffso.com\/blogs\/wp-json\/wp\/v2\/tags?post=343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}