Running webserver...

AppleWatcher

Tigerrr
Could anyone tell me how to run a webserver behind a router and DSL-modem?

The Mac Help index says I have to look at the address down at the preference panel; but this address isn't a IP address...

Because the iMac is behind a router and DSL-modem (in a network), the address is:

http://igor2200/

(Router: Draytek Vigor 2200E)...

Whatz the problem??

Thankx,

AppleWatcher
 
If you mean your router has a NAT, then you have to go into the router's config and open port 80.
 
tk4two1: he said in his first post.

AppleWatcher: as I said, you have to go into your router's config and open port 80 for your internal IP address.
 
YES I DID >> Port 80 stuff is now redirected to my iMac...

But, how do I get my OWN IP?
Or is this just the internal network IP:80?
 
Originally posted by AppleWatcher
YES I DID >> Port 80 stuff is now redirected to my iMac...

But, how do I get my OWN IP?
Or is this just the internal network IP:80?

What do you mean by your own IP? The IP that the NAT gives you, as in the one not accessable by the Internet, or the external IP given to your router?
 
AppleWatcher,

This topic has been addressed on this site before.

Do a search for Router and you should hit several responses.

I'll give you the cliff notes for now:

First to find your ip do the following:

From your OSX machine, open System Preferences

- Look for the 'network' icon and click it.
- Show your "Built-in Ethernet" settings
- Select TCP/IP tab
- Look at the number next to the "IP Address" listing
- Write that number down somewhere.

More then likely that number is NOT a real world IP address.

The short of this is that there are two types of IP addresses... "real world" and "virtual"

When your machine has a real world ip address eveyone in the entire world will reach that machine when addressing those numbers in a browser for example.

All web services have to traffic to a real world ip address at some point.

Since everybody in the world would see the same result. Real world ips have to be unique. And as such usually cost money. But put away your check book... because you already have an address. You got one from your ISP when you purchased your internet connection.

But there's a problem, you can't use it. Your router is already using it. Your router uses that 'real world' ip address to traffic information to any from your ISP.

So how do you solve this problem then?

Enter in virtual ip addresses.

Every machine connected to your router more then likely has been asigned an ip address (a virtual ip address) by your router.

This is probably the number you wrote down earlier.... something like 10.0.0.101 or some low number like that. Each router will be different.

What you wrote down is that machine's virtual ip address. Every machine you add to your router will be assigned an virtual ip address... This addressing system only means something to your router and the machines on your local area network (LAN).

The virtual ip addresses are used for traffic between your router and computer(s) AND NOT the outside world. (Wide Area Network (WAN)).

So all you have to do is to tell your router that you want all (in this case) web traffic to go to your web server. Then those people from the outside world who want to connect to your web server will have to use your Real World IP (which your router is using.)

When you purchased your router you should have had some utility or administrative options... one of which should be DMZ hosting.

Turn DMZ hosting on from your router (each brad is a bit different or else I'd give you step by step instructions).

You should have to specify your DMZ host address... enter the ip address you wrote down earlier.

If you have port forwarding, make sure port 80 is pointing to that same address and also make sure you don't have that port (80) closed, if your router acts as a firewall like mine does.

Bam, you're done... router now knows that when it gets a request for information on port 80 to route that traffic to your webserver.

Again this is really the short of it.. I'm assuming your router is acting as a DHCP server and you that you know how to configure your router.

Hope this helps...
 
Okay first of all: Evildan I'm very glad you want to explain this! Great.

This is the situation:

IP router: 212.45.47.218 (the one i can't use)
IP iMac (virtual): 192.168.1.10

If I type the iMac-IP in a browser in one of the computers of the network; the Apache page is visible.

Router settings:

NAT - Port redirection: Public port: 80
private IP: 192.168.1.10

NAT - DMZ Host: IP: 192.168.1.10

NAT - Open Ports: Local Computer: 192.168.1.10; Start port: 80; Stop port: 80

---

Now, what do I have to do to get the Apache page of my iMac all over the world?

Thankx (special to evildan :p),

AppleWatcher
 
HUH? So if you enter the IP-address of the router you get the Apache page?

When I do I get the configurationpage of the router... :D

AppleWatcher
 
AppleWatcher,

Looks like it's working.. I clicked the link above and it works.

hazmat, with my router if I have DMZ off, no services can be accessed from the WAN. Port forwarding is used to direct traffic (once it's in) to specific machines. i.e. forward all email traffic to your email server and web traffic to your web server etc...

Could be wrong, but I seem to remember it not working without DMZ settins activated.

;)
 
Correct, I get the default Apache page. I don't understand why you would get the router config page from the external IP. It should be 192.168.1.something.
 
Oh-oh guys

One stupid last question :D:D:D

Where do I have to upload the files? Because the Apache-page is located at /library/webserver/something

and Mac Help says I have to drop the files in my /thisisme/Sites/ -folder... :confused:

Haha who can help me with this??

AppleWatcher
 
Originally posted by evildan
hazmat, with my router if I have DMZ off, no services can be accessed from the WAN. Port forwarding is used to direct traffic (once it's in) to specific machines. i.e. forward all email traffic to your email server and web traffic to your web server etc...

Could be wrong, but I seem to remember it not working without DMZ settins activated.

;)

You're wrong. ;) DMZ means that the computer you have it pointed to is fully exposed to the Internet. Unless you need that, leave it closed. For a home machine, you should only need open what has to be. I have ports 21, 22, 25, and 80. That's it.
 
Oh-oh guys

One stupid last question

Where do I have to upload the files? Because the Apache-page is located at /library/webserver/something

and Mac Help says I have to drop the files in my /thisisme/Sites/ -folder...

Haha who can help me with this??

AppleWatcher
 
Originally posted by AppleWatcher
Oh-oh guys

One stupid last question :D:D:D

Where do I have to upload the files? Because the Apache-page is located at /library/webserver/something

and Mac Help says I have to drop the files in my /thisisme/Sites/ -folder... :confused:

Haha who can help me with this??

I can. :) Files accessible from the root of the site are in /Library/WebServer/Documents/. Files under ~/Sites/ is accessible from http://212.45.47.218/~thisisme/. I personally, since it's my home desktop, reconfigured Apache to point the root of the site to ~/Sites.
 
You want to post the files in the following dirrectory.

/library/webserver/documents

This where the origal page that is installed with the OS resides. Just replace it.
 
Back
Top