'How to configure Apache to listen some different port?

I am facing problem in starting XAMPP. First of all it gives me error messages in RED when i start XAMPP control panel. When i click on START APACHE, it starts it but when i open localhost it gives me the following error message.

Not Found

HTTP Error 404. The requested resource is not found.

I have tried various ways to resolve this problem but it isn't solved yet. Kindly guide me.

Thanks.

enter image description here



Solution 1:[1]

checklist

  • first run XAMPP installer by UAC(User Account Control) and Antivirus off and run it as admin
  • uninstall previous XAMP installation
  • turn off IIS temporarily (which will use default port 80)
  • change the port to some free valid port by following below guide
    • summary (Locate the file httpd.conf. This file should be found in C:\xampp\apache\conf folder or via config button in XAMPP control panel and search for 80 port and change it to something like 1234

http://complete-concrete-concise.com/web-tools/how-to-change-the-apache-port-in-xampp

Solution 2:[2]

check services.msc if web deployment agent service is running.

check if IIS is running, stop it.

Solution 3:[3]

As some solutions may suggest you turn off the IIS or some windows related services, you should therefore take precaution since there are possibilities of stopping very useful user process

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Behnam Azimi
Solution 3 Meli