Networking Forums

Networking Forums > Computer Networking > Linux Networking > Apache Virtual Hosts

Reply
Thread Tools Display Modes

Apache Virtual Hosts

 
 
Rich Grise
Guest
Posts: n/a

 
      12-24-2004, 05:45 PM
I've got these three domain names, neodruid.com, neodruid.net, and
neodruid.org. I have a computer on a dynamic IP, so I'm using
http://www.zoneedit.com dynamic DNS server; all is well.

Except for the fact that I've only got the one IP.

But it looks like I _should_ be able to bring in three names
on one IP, using virtual hosts.

First, is it even possible?

www.neodruid.com 4.11.176.232 \ / www.neodruid.com
www.neodruid.net 4.11.176.232 >--- apache ---< www.neodruid.net
www.neodruid.org 4.11.176.232 / \ www.neodruid.org

The latest and greates try, I've got

NameVirtualHosts *:80

and then

<VirtualHost *:80>
ServerName www.neodruid.com
....
</VirtualHost>

<VirtualHost *:80>
ServerName www.neodruid.net
....
</VirtualHost>

<VirtualHost *:80>
ServerName www.neodruid.org
....
</VirtualHost>

and the latest error message is:
[crit] (98) Sddress already in use: make_sock: could not bind to address
4.11.176.232 port 80

And this is about the fourth permutation I've tried in the conf. file.

So, is it actually possible, or do they have to be like

daphne.neodruid.com
thunderbird.neodruid.com
forum.neodruid.com

and that sort of thing? (notice same FQDN)?

Thanks for any insight here.

Thanks!
Rich

 
Reply With Quote
 
 
 
 
Davide Bianchi
Guest
Posts: n/a

 
      12-24-2004, 05:54 PM
On 2004-12-24, Rich Grise <(E-Mail Removed)> wrote:
> First, is it even possible?


Sure.

> and the latest error message is:
> [crit] (98) Sddress already in use: make_sock: could not bind to address
> 4.11.176.232 port 80


Meaning: there is already something running on port 80. Maybe
you already have one apache or something else running.

Note: if all 3 domains/sites have to point to the same document root,
you can use just one VirtualHost and the ServerAlias directive.

Davide

--
Welcome to Hell! Here's your copy of Windows!
 
Reply With Quote
 
Rich Grise
Guest
Posts: n/a

 
      12-24-2004, 06:47 PM

OK, I've got http://www.neodruid.net WebForwarded at
http://www.zoneedit.com to http://www.neodruid.com:8008 and
http://www.neodruid.org forwarded to http://www.neodruid.com:8080.

Will it be long before httpd.conf tells me how to get the address
window to show the alias? i.e. the address window shows
http://www.neodruid.com:8080 even though the page is actually
the one at http://www.neodruid.org.

Well, I'm getting there - give me a few hours to work on this
one. :-)

Thanks!
Rich


 
Reply With Quote
 
Rich Grise
Guest
Posts: n/a

 
      12-24-2004, 06:51 PM
On Fri, 24 Dec 2004 18:54:55 +0000, Davide Bianchi wrote:

> On 2004-12-24, Rich Grise <(E-Mail Removed)> wrote:
>> First, is it even possible?

>
> Sure.
>
>> and the latest error message is:
>> [crit] (98) Sddress already in use: make_sock: could not bind to address
>> 4.11.176.232 port 80

>
> Meaning: there is already something running on port 80. Maybe
> you already have one apache or something else running.
>
> Note: if all 3 domains/sites have to point to the same document root,
> you can use just one VirtualHost and the ServerAlias directive.
>

Actually, I've got three different document roots, which was the problem.

I've read the instructions, ;-) and found out that there can be only
one domain name per IP. I guess that's what "fully-qualified" means.
Duh.

So, http://www.zoneedit.com says, "Use web forwarding". So I did.

Now, I'm working on how to get the addy window in the browser to
show the http://www.neodruid.net instead of http://www.neodruid.com:8080
and so on.

I _know_ it's either in httpd.conf comments or the other docs "somewhere" ;-)

Thanks!
Rich


 
Reply With Quote
 
Jim Berwick
Guest
Posts: n/a

 
      12-24-2004, 08:53 PM
Rich Grise <(E-Mail Removed)> wrote in
news(E-Mail Removed):

> <VirtualHost *:80>
> ServerName www.neodruid.com
>


Don't do this. Do this:
NameVirtualHosts 1.2.3.4:80 <-- Insert your IP here

<VirtualHost site1.com:80>
servername www.site1.com
Alias www.site1.com site1.com
DocumentRoot %whatever% other settings you need
</VirtualHost>

<VirtualHost site2:80>
servername www.site2.com
Alias www.site2.com site2.com
etc
</VirtualHost>

If this doesn't get you going, you can go ahead and email me at the
address on this post (it is valid and working) and I'll send you the
relavent portions of my httpd.conf as a guide.
 
Reply With Quote
 
Ken
Guest
Posts: n/a

 
      12-24-2004, 09:18 PM
Hi Rich -

On Fri, 24 Dec 2004 19:51:18 GMT, Rich Grise <(E-Mail Removed)> wrote:

>I've read the instructions, ;-) and found out that there can be only
>one domain name per IP. I guess that's what "fully-qualified" means.
>Duh.


I run two different domains, each with multiple hosts, plus some dummy
stuff to keep attacks and proxy attempts out of my regular sites, no
problem.

Nor do I code my IP address in the NameVirtualHosts command as was
suggested in another message. Nor do I run any of it on any port
other than 80.

Some snippets of my httpd.conf:

NameVirtualHost *

<VirtualHost *>
ServerName www.ke9nr.net

<VirtualHost *>
ServerName www.ke9nr.org

<VirtualHost *>
ServerName ke9nr.net
ServerAlias ke9nr.org

I have more VirtualHost containers than those, but the other ones are
for private host names that I don't want to reveal and the special
ones to catch attacks and proxy attempts.

--
Ken
http://www.ke9nr.net/
 
Reply With Quote
 
Erik Aronesty
Guest
Posts: n/a

 
      12-25-2004, 10:45 PM
> So, http://www.zoneedit.com says, "Use web forwarding". So I did.
>
> Now, I'm working on how to get the addy window in the browser to
> show the http://www.neodruid.net instead of

http://www.neodruid.com:8080
> and so on.


You should be able to click the "cloaked" checkbox on your webforward,
which will cause zoneedit to "frame" your page... masking the
underlying URL.

So

http://www.neodruid.net forwards to http://www2.neodruid.com:8080 but
is hidden by the frame.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache virtual hosts not resolving correctly Ninjak on FW Linux Networking 5 01-12-2007 12:56 PM
Virtual hosts + proxypass question Chris Stoddart Linux Networking 1 12-06-2004 10:56 AM
apache viurtual hosts upro Linux Networking 2 11-25-2004 11:19 AM
virtual hosts, ownership of logs Ohmster Linux Networking 0 08-08-2004 03:33 AM
Apache Virtual Server Leslie Roger Linux Networking 2 07-21-2004 11:59 AM



1 2 3 4 5 6 7 8 9 10 11