Below I have included what I think are the controlling sections of  httpd.conf Apache configuration file.

Operating in a LAN, I can access the Apache web server either by the machine IP address or by the machine name.  For example, with the below Apache configuration settings and from any workstation in the LAN, I can direct the browser to http://spcl/directory/file where "spcl" is the name of the machine with IP address 192.168.1.4.  Alternatively, I can use http://192.168.1.4/directory/file. All the machines on the LAN resolve on the basis of the "hosts" and "lmhosts" files.

In addition, I am not sure, if when connected to a dial up line to my ISP, and getting a dynamically assigned IP address, that the Apache server will take that same IP address assigned to the machine by the ISP and identify itself as having that IP.  I used to do this all the time to allow temporary access to the Apache web server from the internet for the duration of my ISP connection session.  I think the following set up still allows that to happen.(Re: BindAddress and UseCanonicalName On). I had also done the same thing through a Linux gateway machine using ipchains and I think the Apache web server still behaves that way but have not specifically checked it out as I need two concurrent Internet sessions to test it.

So my first question is just seeking a confirmation and the rationale that the following set up still allows that kind of mixed operations, specifically; client response on the basis of LAN assigned name as well as LAN assigned IP address as resolved using the hosts and lmhosts files (this part I  know is working) as well as ISP dynamically assigned IP address for the duration of the ISP connection (which I think is still working)?

Part of my problem is that I really don't have a lot of insight regarding how the several configuration parameters collectively account for the above server behavior, that is whether one parameter accounts for this total behavior or collectively they each contribute in some way.  I notice some are commented out but there are still default actions that apply.

My second question regards duplicating on this LAN based Apache web server the recognition of another name, like an alias, as an alternative to setting up a virtual server with that other name.  I don't know which route will result in the fewest problems as the server is set up for database access.  

In the LAN operation the server assumes the name of the machine and reponds to the LAN associated IP and as I said before, also probably the ISP dynamically assigned IP.  But my objective is to duplicate my hosted virtual server web site on the Internet exactly as is but located on this LAN based machine.  This would mean the LAN based Apache web server would need to also identify itself with a name like http://www.mysite.com. This is necessary because the web content urls all make use of the full path name.  It looks to me that I would accomplish this simply by setting the ServerName or BindAddress to this name as oppossed to the default now used??? The problem I see is the "ServerName" needs to be a bonifide DNS name translateable to a fixed IP address. If this is the case (?), does this mean that I need to add a DNS machine to my LAN or would the current Linux resolve process (uses hosts and lmhosts to resolve the IP address) make that unnecessary?  I can't just use the IP address on the internated associated with http://www.mysite.com because the web site URLs all use the web site name as for example;  http://www.mysite.com/doc/images/thispicture.  

In other words if I included http://www.mysite.com with an IP address in both hosts and lmhosts files would that resolve  in place of a DNS machine.  What I am trying to do here is get the imported web site to first work on the LAN as is, and then I can move to my next step.  If I were to do this change, would that end up also disabling the existing operations explained in the above paragraphs.  In other words can I have it both ways without having to create a virtual server to duplicate the hosted web site on the internet?  Some of my remarks may  involve assumptions, so if you see any false assumptions please clarify for me.

Once I have things working as above on the LAN then my next step is to put that LAN web server directly onto the internet via a 2 way satellite connection.  That allows me to operate the web page server from my location and not a far away location as is now the case. This way I can maintain the machine as I see fit and at less cost and difficulty.  That is why I am doing this in steps so I can check the web server operation from it's present configuration stage forward to my objective by stages.

Here are the Apache web server existing configuration parts that I think are applicable.

#
# ServerType is either inetd, or standalone.  Inetd mode is only supported on
# Unix platforms.
#
ServerType standalone


#
# BindAddress: You can support virtual hosts with this option. This directive
# is used to tell the server which IP address to listen to. It can either
# contain "*", an IP address, or a fully qualified Internet domain name.
# See also the <VirtualHost> and Listen directives.
#
#BindAddress *

#
# If your ServerType directive (set earlier in the 'Global Environment'
# section) is set to "inetd", the next few directives don't have any
# effect since their settings are defined by the inetd configuration.
# Skip ahead to the ServerAdmin directive.
#


#
# Port: The port to which the standalone server listens. For
# ports < 1023, you will need httpd to be run as root initially.
#
Port 80



#
# ServerName allows you to set a host name which is sent back to clients for
# your server if it's different than the one the program would get (i.e., use
# "www" instead of the host's real name).
#
# Note: You cannot just invent host names and hope they work. The name you
# define here must be a valid DNS name for your host. If you don't understand
# this, ask your network administrator.
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address (e.g., http://123.45.67.89/)
# anyway, and this will make redirections work in a sensible way.
#
#ServerName www.name.com


#
# UseCanonicalName:  (new for 1.3)  With this setting turned on, whenever
# Apache needs to construct a self-referencing URL (a URL that refers back
# to the server the response is coming from) it will use ServerName and
# Port to form a "canonical" name.  With this setting off, Apache will
# use the hostname:port that the client supplied, when possible.  This
# also affects SERVER_NAME and SERVER_PORT in CGI scripts.
#
UseCanonicalName On

Any help or constructive comments with this would be appreciated.

Bye-thanks_TED


Reply via email to