Page 1 of 1

localhost vs. 127.0.0.1

PostPosted: 02. March 2015 23:42
by Defreeze
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

Re: localhost vs. 127.0.0.1

PostPosted: 02. March 2015 23:45
by Strokerace
What browser are you using?

Re: localhost vs. 127.0.0.1

PostPosted: 02. March 2015 23:50
by Defreeze
I use Firefox

Re: localhost vs. 127.0.0.1

PostPosted: 03. March 2015 00:29
by Altrea
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.

Re: localhost vs. 127.0.0.1

PostPosted: 03. March 2015 11:15
by Defreeze
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...

Re: localhost vs. 127.0.0.1

PostPosted: 03. March 2015 16:13
by Altrea
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.

Re: localhost vs. 127.0.0.1

PostPosted: 03. March 2015 16:58
by Defreeze
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.

Re: localhost vs. 127.0.0.1

PostPosted: 03. March 2015 17:02
by Altrea
Thats okay :D
I wish you all the best and much fun with your projects 8)