http://localhost:8080 is not working on running apacher Server through XAMPP

116,950

Solution 1

In general, messing with the ports that your operating system is using just seems like a bad idea. You’ll end up with weird network issues like when trying to print.

In addition, for me having two web servers (IIS running locally for .NET projects) listening on different ports was important.

The best situation was to simply change the IP Port that Apache listens on (the default is port 80, which is the standard for all web traffic).

I changed mine to port 8666 (but it could be anything above 1024). I did the following:

  1. Locate the httpd.conf file in the following directory

    [install directory]\xampp\apache\conf

    (mine was in, C:\xampp\apache\conf)

  2. Find the line that says, "Listen 80"

  3. Change it to "Listen 8666"
  4. Save and Close the file
  5. Start or restart the Apache service in the XAMPP control panel.

Life should be good.

The only catch to this method is that you can’t just go to http://localhost/xampp any more. You have to tell your browser which port specifically to use (it will by default use 80), so you will have to use http://localhost:8666/xampp/ (the port is designated by the colon and then the number).

The cool thing is I can run http://localhost:8666 to run Apache and http://localhost:8616 to run my local IIS for .NET projects.

Note: XAMPP install path must NOT have special characters in it. Spaces are allowed, parentheses are NOT allowed. Other special characters have to be tested. Apache will not start if the XAMPP install path contains special characters such as parentheses.

Solution 2

You have already done the maximum. Go to the XAMPP control panel and try to do the following:

Config (right-top corner of window) > Service and Port Settings > Apache > assign your modified port number.

Share:
116,950

Related videos on Youtube

Dinesh Kumar
Author by

Dinesh Kumar

Updated on September 18, 2022

Comments

  • Dinesh Kumar
    Dinesh Kumar over 1 year

    I am unable to configure a PHP/MySQL/Apache environment on my local machine using XAMPP.

    In my xampp control panel the Apache and MySQL status is shown as started, but localhost URL is not working.

    When I start xampp_start.exe I get the following error message.

    Only one usage of each socket address (protocol/network address/ port) is normally permitted. :make_sock: could not bind to address 127.0.0.1:80 no listening socket available, shutting down. Unable to open logs

    I have tried the following methods but still I am unable to fix this issue:

    1. I tried to reinstall after uninstalling several time.
    2. I changed the "Listen 80" to Listen localhost:80, localhost:8080, 127.0.0.1:80, 127.0.0.1:8080, MySystemIP:80/8080 and tried to execute the relevant url in my browser.
    3. I executed the netstat -noa and tasklist and found only Apache alone is using Port80.
    4. Skype is also not using the port80.
    5. I edited the firewall to allow port80.
    6. Also disabled the firewall.

    Is there any other solution to fix my problem. I remember that, everything worked properly once and 10 months back I uninstalled the setup. Now when i try to reinstall xampp the issue is raised. I am Using Win-xp os. Am using avast AntiVirus. Installed XAMPP Windows 1.7.7 installer in "E/xampp" location , but my program files and OS are installed in C drive.

    Please help me ASAP. Thanks a lot in advance

    • Dinesh Kumar
      Dinesh Kumar over 12 years
      Is that a timeout problem ? If so then how can I fix it ?
    • iglvzx
      iglvzx over 12 years
      Does it work when you install it to your C drive? I think you may need to use the Portable version if you want to run it from an external drive.
    • Dinesh Kumar
      Dinesh Kumar over 12 years
      @iglvzx: No I never tried it in C drive as i do not have any space in it. :-). Thank U
  • Gayan Weerakutti
    Gayan Weerakutti over 4 years
    Instead of replacing "Listen 80", I'd add a new line instead.