0

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!

Thew
  • 103
  • 3

3 Answers3

2

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

Michael
  • 1,135
  • 1
  • 10
  • 16
  • When i tupe http://192.168.1.100 (witch came on the IP adres row in CMD) i get an connection timed out error... –  Mar 01 '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 01 '11 at 16:15
  • And make sure the firewall on your machine is allowing connections in to port 8000. – Michael Mar 01 '11 at 16:16
  • @Michael: To what ip adress? –  Mar 01 '11 at 16:17
  • @Thew Forward port 8000 to 192.168.1.100 and your firewall should allow port 8000 for any connection (if that's what you want) or only specific hosts. – Michael Mar 01 '11 at 16:19
  • See my update in the openingspost (the question)... It still doesn't work – Thew Mar 01 '11 at 16:29
  • 1
    @Thew can you set the 'Type' to TCP? – KJ-SRS Mar 01 '11 at 18:22
1

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.

Ian Pugsley
  • 111
  • 4
0

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