localhost vs. 127.0.0.1

Problems with the Windows version of XAMPP, questions, comments, and anything related.

localhost vs. 127.0.0.1

Postby Defreeze » 02. March 2015 23:42

Hi,

I've installed Xampp 1.8.1 on Windows XP Pro SP3.
Before I've had an installation of IIS5, which I uninstalled. So I still had my old documentroot. After the installation seemed ok, I changed the documentroot to c:/Inetpub/wwwroot. I imported my MySQL databases. Now if I browse to localhost everything works fine. But If I browse to 127.0.0.1 a strange thing happens: xampp is automatically added to the url (so it says http://127.0.0.1/xamp/ and of course I get an error 404 with "Object not found".
If I put the server online the same problem happens. I have no idea how to fix this.

Can anyone help me?

Thanks!
Rein
Defreeze
 
Posts: 4
Joined: 02. March 2015 23:28
Operating System: Windows XP Pro SP3

Re: localhost vs. 127.0.0.1

Postby Strokerace » 02. March 2015 23:45

What browser are you using?
Strokerace
 
Posts: 9
Joined: 02. March 2015 23:08
Operating System: Windblow 7

Re: localhost vs. 127.0.0.1

Postby Defreeze » 02. March 2015 23:50

I use Firefox
Defreeze
 
Posts: 4
Joined: 02. March 2015 23:28
Operating System: Windows XP Pro SP3

Re: localhost vs. 127.0.0.1

Postby Altrea » 03. March 2015 00:29

If you changed the documentroot correctly this can not happen, because the redirect to the xampp subfolder is been done by the script \xampp\htdocs\index.php and this can only be requested with the default documentroot.
The only other possibility is the xampp control panel admin button which will automatically request this subfolder by default.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: localhost vs. 127.0.0.1

Postby Defreeze » 03. March 2015 11:15

All of this is not really helpful. Sorry.

There seems to be some confusion over as to include a trailing "/" in addresses or not.
So I tried my Documentroot as "c:/Inetpub/wwwroot/". Now both localhost and 127.0.0.1 do the same: they now boch add /xampp to the address. (localhost/xampp)(127.0.0.1/xampp)
It would be so nice if one could really use this software for something else than xampp's demo and put in their own files...
Defreeze
 
Posts: 4
Joined: 02. March 2015 23:28
Operating System: Windows XP Pro SP3

Re: localhost vs. 127.0.0.1

Postby Altrea » 03. March 2015 16:13

I have installed IIS on my debug computer, just for fun and for having a default website i can test with.

I changed only two lines in my default Apache httpd.conf.

Changed lines 243-244 from
Code: Select all
DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">


to
Code: Select all
DocumentRoot "C:/inetpub/wwwroot"
<Directory "C:/inetpub/wwwroot">


started Apache and i could access the default iis startpage without rerouting to the xampp subdirectory.

So you have done something different than me, but because you don't show us your current configuration providing help is difficult.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: localhost vs. 127.0.0.1

Postby Defreeze » 03. March 2015 16:58

That is exactly what I did.
Anyway, I want to stop with Xampp and just install my own Apache/MySQL/PHP. I think I can handle that. :-)
Thanks for the help.
Defreeze
 
Posts: 4
Joined: 02. March 2015 23:28
Operating System: Windows XP Pro SP3

Re: localhost vs. 127.0.0.1

Postby Altrea » 03. March 2015 17:02

Thats okay :D
I wish you all the best and much fun with your projects 8)
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 87 guests