apache virtual host problem

Karl Auer kauer at biplane.com.au
Mon Feb 4 02:11:10 UTC 2008


On Sun, 2008-02-03 at 20:40 -0500, Ashley Benton wrote:
> Ok I thought that what I had done but apparently not. What would be
> the address of my server? the IP of the computer over the network
> which is 192.168.0.105, the 127.0.0.1 which is the hostname or
> something like that or the public IP.

Well, it depends where you are coming from! It sounds like you are on a
single public address, with a network of private addresses behind NAT.
For now, get it working inside your network. The address to use would
seem to be 192.168.0.105. Then make sure at least one machine in your
network can resolve the various site names to that one address. So:

 site1.mydomain.com = 192.168.0.105
 site2.mydomain.com = 192.168.0.105
 site3.mydomain.com = 192.168.0.105

Then test from that machine. This can be the same machine as you have
running Apache, if necessary.

> avoid me to changed all my files again and again for nothing since I
> don' t seem to get the basic which is what is my server address.

Once you get it sorted out, a global search-and-replace will do the job.
Until then, though, you will still have to edit files.

> Yes I have VirtualHost 192.168.0.105 on the first line and
> <VirtualHost 192.168.0.105 > on the second line. Do I need to write it
> somewhere else?

Um, you need to pay closer attention. NameVirtualHost is on a line by
itself, it is a global directive and is not inside angle brackets or
inside any other directive:

   NameVirtualHost 192.168.0.105

Then you define virtual hosts using this:

   <VirtualHost 192.168.0.105>
      ...
   </VirtualHost>

Note the difference between "NameVirtualHost" and "VirtualHost".

I have no idea what you mean by "first line" and "second line". Please
don't explain, just post your entire Apache config. It's hard to debug
through a pinhole.

Regards, K.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)                   +61-2-64957160 (h)
http://www.biplane.com.au/~kauer/                  +61-428-957160 (mob)

GPG fingerprint: DD23 0DF3 2260 3060 7FEC 5CA8 1AF6 D9E3 CFEE 6B28
Public key at  : random.sks.keyserver.penguin.de

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20080204/29a87403/attachment.sig>


More information about the ubuntu-users mailing list