Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to access localhost by my ip address. My ip address is/was http://217.164.79.62/ (It is set to be automatically assigned so it keeps changing).

When I enter http://localhost/ into the browser I get the xampp homepage.

However when I enter http://217.164.79.62/ into my browser I get the following message:

The server 217.164.79.62:80 requires a username and password.

User Name:
Password:

How do I get the username and password?

share|improve this question

closed as off topic by MDMarra, Sam Nov 1 '11 at 12:31

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Now that the question is solved, please mark it as so by clicking the tick beside the answer you found most helpful. This is to avoid people wasting time answering a question only to find that the questioner has already figured it out. Thanks. –  Josh Dec 31 '10 at 19:55

4 Answers 4

To access the server from itself, use http://localhost/ or http://127.0.0.1/.

To access the server from a separate computer on the same network, use http://192.168.X.X where X.X is your server's local IP address. You can find the sever's local IP address (assuming it's Linux) by running hostname -I.

share|improve this answer
1  
127.0.0.1 works on this computer but it does not work on other computers. http://217.164.79.62/ works on any computer in my network but requests username and password... ;( Sorry for taking so long. I hadn't expected answers this quickly. :D –  Malte Werschy Dec 5 '10 at 6:29
    
Problem solved. I can access the computer by using 192.168.254.4. :D Thanks for all the help! :D –  Malte Werschy Dec 5 '10 at 7:28
    
@Malte Werschy: Sorry, I must have missed your reply until now. I've updated my answer with information about local IPs (192.168.X.X) which should hopefully allow you to bypass whatever security policy is denying you access. –  Josh Dec 31 '10 at 19:45

Do you have a Modem/router type device to connect to the internet? It sounds like you are connecting to the configuration interface for this.

Alternatively: On what platform do you use XAMPP? Could you post the output of ipconfig in Windows or sudo ifconfig in Linux/MacOS?

--- Edit

OK, so with the info you gave here, it is now clear what the problem is (and that this belongs on superuser.com instead of Serverfault).

When you try to connect to your public IP address, you are in fact reaching your router, not your XP box. If you really would want to connect to the XAMPP server with this public IP address, you would need to configure your router to forward port 80 to your XP machine so that it is accessible from the outside (you will find how that is done in the routers documentation). However, this is a terrible idea if you just want to test things and don't need others to access it. Instead, you would either use 127.0.0.1, which would only work on your XP box, or 192.168.254.4, which would be accessible from any computer in your home LAN.

Could you edit your original question and tell us why you want to use the IP address instead of http://localhostin the first place?

NB: The info you gave on the router/modem stated that it's firewall is deactivated. This is normally a really bad idea, I would strongly recommend turning it on. How this is done will also be explained in the documentation.

share|improve this answer
    
Yes I do have a modem. The ip address of the modem is 192.168.254.254. The data report of the modem is: System Type: SpeedStream 6520 Series DSL Connection Information: UP Router IP Address: 192.168.254.254 WAN IP Address: 217.164.79.62 Firewall: Off Config Part #: 003-a193-G02 Firmware Part #: 004-E752-A64 MAC Address: 00:13:A3:D0:FB:2A Up Time: 0 days, 21 hours, 6 minutes, 36 seconds I use xampp on windows xp. the output of ipconfig is: Windows IP Configuration Ethernet adapter Local Area Connection: Conection-specific DNS Sufix . : domain.invalid Continued in next post. –  Malte Werschy Dec 5 '10 at 6:41
    
What is it with this formatting? Am I doing something wrong? How do I get {enter_key}? Anyway continued report is: IP Address: 192.168.254.4 Subnet Mask: 255.255.255.0 IP Address: fe80::203:dff:fe44:41df%4 Default Gateway: 192.168.254.254 Ethernet adapter Wireless Network Connection: Media State: Media disconnected Tunnel adapter Teredo Tunneling Pseudo-Interface: Connection-specific DNS Sufix: {Continued} –  Malte Werschy Dec 5 '10 at 6:49
    
IP Address: fe80::ffff:ffff:fffd%6 Default Gateway: Tunnel adapter Automatic Tunneling Pseudo-Interface: Connection-specific DNS Suffix: IP Address: fe80:ffff:ffff:fffd%6 Default Gateway: Tunnel adapter Automatic Tunneling Pseudo-Interface: Connection-specific DNS Suffix: domain.invalid IP Address: fe80::5efe:192.168.254.4%2 Default Gateway: I am really sorry for this formatting. ;( I just don't know how to do it better... ;( –  Malte Werschy Dec 5 '10 at 6:56
1  
Malte, I edited my answer with some more infos. Also, it should be possible for you to edit your question to append infos like the above. Doing this in the question instead of a comment makes it easier to format and easier to find. –  Sven Dec 5 '10 at 12:14

http://localhost is NOT the same as http://217.164.79.62

The localhost address is 99.999% of the time mapped to the IP address 127.0.0.1 and is totally inaccessible from anywhere except your local machine

What you're finding when you're entering http://217.164.79.62 is that your modem/router device owns that IP address, so you're getting the login screen for it.

share|improve this answer
    
So i need the password of the modem? –  Malte Werschy Dec 5 '10 at 6:58
    
@Malte - no, you clearly didn't read what I wrote. You don't want to use 217.164.79.62 - you want to use 127.0.0.1. If you're trying to get other people to see your site (you don't mention this in your question), then this is another matter alltgoether. –  Mark Henderson Dec 5 '10 at 9:26

It sounds like you are trying to connect to your modem. That means you havent made your router configiration in your modem for your static ip...if you dont have an static ip, you cant make route to port 80 with this ip adress...and this shows, you cant log in to localhost with this ip...use 127.0.0.1 to connect localhost instead of this, if you dont have an static ip and if you havent made config of your router...

share|improve this answer
    
Please, I'm new to this. I don't really understand what you mean. ;) Can you explain please? thanks. –  Malte Werschy Dec 5 '10 at 7:02

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