[xampp] Localhost : 404 not found

I am using XAMPP. and internal server of Django. When I browse to localhost or 127.0.0.1, It shows Not Found . HTTP Error 404. The requested resource is not found.

It sometimes works fine and other times pops up the error.

Moreover, when I browse to my project url, ie 127.0.0.1:8000/cc , the project url works fine.

Any ideas why is this happening?

This question is related to xampp localhost

The answer is


Many frameworks like Laravel , Django ,... run local web server that work on another port except 80.For example port 8000 is the most commen port that these local web servers use.

So when you run web servers that frameworks build them and type localhost:8000 it works well.But web server that xampp(apache) runs it has another port.In default it has 80 that it does not need to type it in url.And if you change port you should mention it in url.

**In brief:**web server in framework is different from web server in xampp . Check the port of each server and mention it in url when you use them.


I had the same problem and here is how it worked for me :

1) Open XAMPP control panel.

2)On the right top corner go to config > Service and Port setting and change the port (I did 81 from 80).

3)Open config in Apache just right(next) to Apache admin Option and click on that and select first one (httpd.conf) it will open in the notepad.

4) There you find port listen 80 and replace it with 81 in all place and save the file.

5) Now restart Apache and MYSql

6) Now type following in Browser : http://localhost:81/phpmyadmin/

I hope this works.


If your server is still listening on port 80, check the permission on the DocumentRoot folder and if DirectoryIndex file existed.


you need to stop that service running on this port .check service running on specific port by "netstat -ano".then in window search type services.exe and search that process and stop that process .to change port of that process check this http://seankilleen.com/2012/11/how-to-stop-sql-server-reporting-services-from-using-port-80-on-your-server-field-notes/


open D:\xampp\apache\conf\extra\httpd-vhosts.conf

ServerName localhost DocumentRoot "D:\xampp\htdocs" SetEnv APPLICATION_ENV "development"
DirectoryIndex index.php AllowOverride FileInfo Require all granted

Restart Apache server

and then refresh your given url


You need to add the port number to every address you type in your browser when you have changed the default port from port 80.

For example: localhost:8000/cc .

A little edition here is that it should be 8080 in place of 8000. For example - http://localhost:8080/phpmyadmin/


Type in "netstat -ano" into your command line. I saw that it was showing something for Local Address port 0.0.0.0:80.

My issue was because I had SQL Server Reporting Services on Port 80. So I followed these instructions and changed the port # from 80 to 81:

http://seankilleen.com/2012/11/how-to-stop-sql-server-reporting-services-from-using-port-80-on-your-server-field-notes/

Here is a picture of my command line after I changed the port number for SQL Server Reporting Services:

enter image description here

If you are still having the same issue, read this forum:

http://forum.wampserver.com/read.php?2,66196,66233#REPLY