Home > Archive > dBASE Web Applications > April 2005 > Apache and ip-adressing









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Apache and ip-adressing
M M

2005-04-04, 8:03 pm

Im quite new to this about servers. I have a dynamic DNS service that
connect an alias URL to the dynamic IP address on my router. They match, so
its no update problem. I also have the apache server installed and working
(at least on local host). My idea is that i would type the URL alias in the
browser and the server should kick in, displaying the index.htm page.
Question is how this links together?
On my D-link DI 804 router i have opened port 8081 for tcp/ip connected to
my local ip address on the NIC -192.168.0.100 where the server is installed.
I also set apache - httpd.conf - to Listen for 8081. The servername here is
the same as that of dyn DNS service "hostname.dyndns.org". But i get "The
page cannot be displayed" when i enter the URL address in the browser.
Whats missing?

/Mats


Michael Nuwer [dBVIPS]

2005-04-04, 8:03 pm

M M wrote:
> Im quite new to this about servers. I have a dynamic DNS service that
> connect an alias URL to the dynamic IP address on my router. They match, so
> its no update problem. I also have the apache server installed and working
> (at least on local host). My idea is that i would type the URL alias in the
> browser and the server should kick in, displaying the index.htm page.
> Question is how this links together?
> On my D-link DI 804 router i have opened port 8081 for tcp/ip connected to
> my local ip address on the NIC -192.168.0.100 where the server is installed.
> I also set apache - httpd.conf - to Listen for 8081. The servername here is
> the same as that of dyn DNS service "hostname.dyndns.org". But i get "The
> page cannot be displayed" when i enter the URL address in the browser.
> Whats missing?


Hello Mats,

I have an almost identical setup of my Internet connections as you have.

For a client that is on the Internet, they will access your server with
something like the following:

http://hostname.dyndns.org:8081/index.htm (1)

However, for machines inside your private network, that is, on the same
side of your router as your server, the address will be:

http://192.168.0.100:8081/index.htm (2)

I have never been able to use successfully a machine in the private
network and the fully qualified Internet address
(hostname.dyndns.org:8081) to access the server. So when I'm inside my
private network I must use the private IP number (2), but when I'm in
the Internet I can use the dyndns.org address (1).

Note that the port number is required because you are not using the
standard, or assumed, number. Generally, apache will be able to handle
this automatically, so long as the first request uses the port number.
Therefore, you do not need to insert the port number into all of your
links, only first one.

In your httpd.conf file you should use the following

Listen 192.168.0.100:8081
Port 8081
ServerName 192.168.0.100


--
Michael Nuwer
http://www.ChelseaData.ca/dLearn/
http://www.nuwermj.potsdam.edu/dSamples/
Bowen Moursund [DataTech]

2005-04-04, 8:03 pm

> For a client that is on the Internet, they will access your server with
> something like the following:
>
> http://hostname.dyndns.org:8081/index.htm (1)
>
> However, for machines inside your private network, that is, on the same
> side of your router as your server, the address will be:
>
> http://192.168.0.100:8081/index.htm (2)
>
> I have never been able to use successfully a machine in the private
> network and the fully qualified Internet address
> (hostname.dyndns.org:8081) to access the server.


The Windows hosts file can be used for this purpose, and is quite handy. One
uses it to map names to addresses, e.g.:

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost

# My mappings
192.168.0.100 hostname.dyndns.org

# end of file

I'm not sure whether the port can be specified, or needs to be specified.

On my W2k machine, the hosts file is located at:

C:\WINNT\system32\dr
ivers\etc\hosts

--
Bowen Moursund
DataTech
http://www.bmmnet.us

M M

2005-04-04, 8:03 pm

Fine, i could reach the apache testpage when entering:
http://192.168.000.100:8081/ .
I havenīt redirected the server to another directory yet, so i guess there
is no index.htm to be seen :-)
//Mats

"Michael Nuwer [dBVIPS]" <nuwermj@nospam.please.yahoo.com> wrote in message
news:bzp9nLr3EHA.1092@news-server...
>M M wrote:
>
> Hello Mats,
>
> I have an almost identical setup of my Internet connections as you have.
>
> For a client that is on the Internet, they will access your server with
> something like the following:
>
> http://hostname.dyndns.org:8081/index.htm (1)
>
> However, for machines inside your private network, that is, on the same
> side of your router as your server, the address will be:
>
> http://192.168.0.100:8081/index.htm (2)
>
> I have never been able to use successfully a machine in the private
> network and the fully qualified Internet address
> (hostname.dyndns.org:8081) to access the server. So when I'm inside my
> private network I must use the private IP number (2), but when I'm in the
> Internet I can use the dyndns.org address (1).
>
> Note that the port number is required because you are not using the
> standard, or assumed, number. Generally, apache will be able to handle
> this automatically, so long as the first request uses the port number.
> Therefore, you do not need to insert the port number into all of your
> links, only first one.
>
> In your httpd.conf file you should use the following
>
> Listen 192.168.0.100:8081
> Port 8081
> ServerName 192.168.0.100
>
>
> --
> Michael Nuwer
> http://www.ChelseaData.ca/dLearn/
> http://www.nuwermj.potsdam.edu/dSamples/



M M

2005-04-04, 8:03 pm

Fine, after editing hosts, i could reach the apache testpage when entering
http://mydyntest.dyndns.org:8081/ in my browser.
Just wondering if it is reachable from the web also? Would be nice if
someone tryed it today and posted an answer.

//Mats



"Bowen Moursund [DataTech]" <bmoursund@no.spam.bmmnet.us> wrote in message
news:go$dFnt3EHA.1092@news-server...
>
> The Windows hosts file can be used for this purpose, and is quite handy.
> One
> uses it to map names to addresses, e.g.:
>
> # Copyright (c) 1993-1999 Microsoft Corp.
> #
> # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
> #
> # This file contains the mappings of IP addresses to host names. Each
> # entry should be kept on an individual line. The IP address should
> # be placed in the first column followed by the corresponding host name.
> # The IP address and the host name should be separated by at least one
> # space.
> #
> # Additionally, comments (such as these) may be inserted on individual
> # lines or following the machine name denoted by a '#' symbol.
> #
> # For example:
> #
> # 102.54.94.97 rhino.acme.com # source server
> # 38.25.63.10 x.acme.com # x client host
>
> 127.0.0.1 localhost
>
> # My mappings
> 192.168.0.100 hostname.dyndns.org
>
> # end of file
>
> I'm not sure whether the port can be specified, or needs to be specified.
>
> On my W2k machine, the hosts file is located at:
>
> C:\WINNT\system32\dr
ivers\etc\hosts
>
> --
> Bowen Moursund
> DataTech
> http://www.bmmnet.us
>



Bowen Moursund [DataTech]

2005-04-04, 8:03 pm

> Fine, after editing hosts, i could reach the apache testpage when entering
> http://mydyntest.dyndns.org:8081/ in my browser.
> Just wondering if it is reachable from the web also?


Yes.

--
Bowen Moursund
DataTech
http://www.bmmnet.us


Michael Nuwer [dBVIPS]

2005-04-04, 8:03 pm

Bowen Moursund [DataTech] wrote:

>
>
> The Windows hosts file can be used for this purpose, and is quite handy. One
> uses it to map names to addresses, e.g.:


Very nice and simple soulution, thanks for the tip.

--
Michael Nuwer
http://www.ChelseaData.ca/dLearn/
http://www.nuwermj.potsdam.edu/dSamples/
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com