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

server settings

Hello again stackoverflow! I want to get my Apache + PHP + Mysql server behind the router, so that my apache server is available at http://myipadress:8000/ or something like that.

Only these settings above don't work? I get an error that the local IP is not correct?!

On my PC its available at http://localhost/ and http://127.0.0.1/ so why wont these settings work?

And how can i set the port number, for example, when you have http://myipadress:8000/ how can i set that :8000?

Help please!!

Greetings

Edit: I also found the button Virtual Server, same error: Local ip not correct...

edit 2

spsda daads adads

Still doesn't work!

share|improve this question

migrated from stackoverflow.com Mar 1 '11 at 16:21

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

    
Why are you forwarding port 80 and trying to access 8000? –  Ash Burlaczenko Mar 1 '11 at 16:18

3 Answers 3

up vote 2 down vote accepted

The local IP should be your computer's address from the router's perspective, probably something like 192.168.1.x. 127.0.0.1 is your computer's local address from its own perspective and that address cannot be used by any other devices to refer to it. (Actually, all other devices would use it to refer to themselves too!)

If it's a windows machine, from a command prompt do ipconfig /all to find out the address. If it's a *nix machine, do ifconfig or /sbin/ifconfig

share|improve this answer
    
When i tupe 192.168.1.100 (witch came on the IP adres row in CMD) i get an connection timed out error... –  Thew Mar 1 '11 at 16:13
    
From your screenshot, it looks like your router is attempting to forward port 80-81 externally to 80-81 internally, meaning nothing is getting to your port 8000 where you evidently have your apache running. Try to either move your apache to run on port 80, or setup the port forward to forward range 8000-8000. –  Michael Mar 1 '11 at 16:15
    
And make sure the firewall on your machine is allowing connections in to port 8000. –  Michael Mar 1 '11 at 16:16
    
@Michael: To what ip adress? –  Thew Mar 1 '11 at 16:17
1  
@Thew can you set the 'Type' to TCP? –  KJ-SRS Mar 1 '11 at 18:22

There's a great resource in http://portforward.com/ that will help you go through the process for a variety of router manufacturers and port usages.

The first issue is that your local IP address isn't 127.0.0.1 - that's localhost (http://en.wikipedia.org/wiki/Localhost). Find your local IP address via the instructions on http://www.wikihow.com/Find-the-IP-Address-of-Your-PC (use ipconfig /all from a command prompt).

The second is the port forward itself. You want to forward external port 8000 to your internal port 80.

share|improve this answer
    
I checked portforward and nothing worked –  Thew Mar 1 '11 at 16:40

127.0.0.1 is the loopback/local address. It's the address your computer uses to identify itself to itself. Just about all computers use 127.0.0.1 for that, as that's what the address is reserved for. Your router probably has a failsafe against using 127.0.0.1 for that, as it would redirect all port 80-81 traffic to it's loopback address, which is itself, and thus it might just keep going in circles. You need your internal network ip address which the router uses to identify the server. Probably 192.168.1.Something, maybe a 10.0.whatever address depending on the router.

Fun fact: Cable modems and their status pages can often be reached at 192.168.100.1

share|improve this answer
    
Well i have cable and thats where 192.168.0.1 is heading to in the first place... –  Thew Mar 1 '11 at 16:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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