from 3 years, I am unable to find the solution for this thing, I want to use http://localhost/ for either for XAMPP for PHP testing, and something like http://localhost:32465/ default locations for Visual Studio for .NET C# and ASP.NET. Is this possible to run both on same computer. I want to learn both of them.

-------------------------------- Update : Thanks nnichols, I did your way. Thanks everyone for helping me. --------------------------------

migrated from stackoverflow.com Mar 19 '12 at 2:12

This question came from our site for professional and enthusiast programmers.

  • Around here we say thank you by accepting answers :) Just click on the tick image to the left of the answer you want to accept. – nnichols Mar 17 '12 at 17:54

You just need to configure Apache on port 80, which is the default. And you need IIS to bind to port 8080 (or whatever port you want). By default IIS will bind to port 80 but you can edit the port number in the properties for each site. This article deals with changing the port that IIS listens on - http://support.microsoft.com/kb/149605. That way you can have both running instead of having to stop one before starting the other.


I added a new IP to my LAN machine, like Apache uses and localhost uses and then defined a new Virtual host at the apache IP and named it http://apachehost/ and then changed all localhost's to apachehost in httpd.conf, also updated the settings for mysql, they're both running fine now.

  • +1 Nice solution. If using a standalone windows machine how would one go about configuring multiple IP addresses? – nnichols Mar 17 '12 at 17:15
  • 1
    you add a new local area connection from network and sharing center (Win7), and you have to define its IP address manually then. Both of them should not be getting their IP's from the DHCP server. – tpaksu Mar 17 '12 at 17:27
  • Thank you for explaining that. Do you know if it is possible to do the same with WiFi? – nnichols Mar 17 '12 at 17:47
  • I didn't try that but if you can define a static LAN IP, I can't see a reason not to. – tpaksu Mar 17 '12 at 17:49

use Xampp, for php, its work in port 80, so you can test your codes by url http://localhost, and If you want use asp.net you can stop Apache from xampp control panel and run your asp.net code

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.