LinuxSA Mailing list archives

Index: [thread] [date] [subject] [author]
  From: Daniel Callan <dcallan@dataline.net.au>
  To  : linuxsa@linuxsa.org.au
  Date: Tue, 17 Nov 1998 18:36:02 +1000

Re: Apache test results

At 18:09 17/11/98 +1000, I wrote:
>(AFAIK)
>Apache is listening for requests made to the IP addresses that
>resolve from the hostnames it is configured to serve.
>That's why the most common prob with Apache is when the DNS
>is not available, it can't make that initial resolution of the
>hostnames and therefore doesn't start because it has nothing to
>listen for.
>
<SNIP>
>PPS: I'm currently configuring 1.3 on a spare server with two
>hostnames resolving to it the main IP with a virthost
>in the config (to test it for sure).
>

Well, it is proven from my end anyway ;-)

I just ran that test server and the virtual host took
control of the main webserver's responses.
(Must admit, I suspected it would be the other around but hey...)

ie:

hostname.dataline.net.au	=	XXX.XXX.XXX.128
alias.dataline.net.au	=	XXX.XXX.XXX.128
(both hosts resolve to the same IP)

Server only responds to that one IP (no IP aliasing on that box)

I setup the /usr/local/apache/conf/httpd.conf as:

#################################################
ServerName hostname.dataline.net.au

[skip a bit of conf stuff]

<VirtualHost alias.dataline.net.au>
ServerAdmin hostmaster@alias.dataline.net.au
DocumentRoot /usr/local/virtualhosts/alias.dataline.net.au/htdocs
ServerName alias.dataline.net.au
ScriptAlias /cgi-bin/ /usr/local/virtualhosts/alias.dataline.net.au/cgi-bin/
ErrorLog /usr/local/virtualhosts/alias.dataline.net.au/logs/error_log
TransferLog /usr/local/virtualhosts/alias.dataline.net.au/logs/access_log
</VirtualHost>
#################################################

I then fired up the httpd and then when it was running went to a browser
and tested the two URLs:
	http://hostname.dataline.net.au/
&	http://alias.dataline.net.au/

Both of them came up with the "htdocs" dir of the virtualhost.
(I doubled checked it with the access_logs of both dir structures
and the virtualhost access_log had both hits in it)

I don't have time to test the combined conf file idea as the
existing 3-4 conf file system works fine (mime file is optional).

Hope this helps,
-Daniel


         Daniel Callan
        Network Manager

     hostmaster@dataline.net.au
      -- DataLine.net.au --
     http://dataline.net.au 

Q: Why do programmers always get Christmas and Halloween mixed up?
A: Because DEC 25 = OCT 31

-- 
Check out the LinuxSA web pages at http://www.linuxsa.org.au/
To unsubscribe from the LinuxSA list:
  mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject


Index: [thread] [date] [subject] [author]
Return to the LinuxSA Mailing List Information Page