Virtual Servers

This is a discussion on Virtual Servers within the Apache Web Server forums, part of the Web Server and Related Forums category; I want to create Virtual Server on my Apache 2 running on Linux. I am very new to both Linux ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-15-2007
Rick
 
Posts: n/a
Default Virtual Servers

I want to create Virtual Server on my Apache 2 running on Linux. I am very
new to both Linux and Apache. I looked at the docs and this is what I have
in my apache2.conf I also tried this in my httpd.conf. When I browse either
testing.mydomain.com or testing1.mydomain.com I get the files in
/var/www/TEST never /var/www/TEST1. I am sure I am doing something stupid
but I cannot figure it out. Please help if you can...

Thanks!!!

<VirtualHost xxx.xxx.xxx.xxx:80>
DocumentRoot /var/www/TEST
<Directory "/var/www/TEST">
allow from all
Options +Indexes
</Directory>
ServerName testing.mydomain.com
UseCanonicalName off
HostNameLookups on
</VirtualHost>

<VirtualHost xxx.xxx.xxx.xxx:80>
DocumentRoot "/var/www/TEST1"
ServerName testing1.mydomain.com
<Directory "/var/www/TEST1">
allow from all
Options +Indexes
</Directory>
UseCanonicalName off
HostNameLookups on
</VirtualHost>


  #2 (permalink)  
Old 09-15-2007
David
 
Posts: n/a
Default Re: Virtual Servers

Rick wrote:
> I want to create Virtual Server on my Apache 2 running on Linux. I am very
> new to both Linux and Apache. I looked at the docs and this is what I have
> in my apache2.conf I also tried this in my httpd.conf. When I browse either
> testing.mydomain.com or testing1.mydomain.com I get the files in
> /var/www/TEST never /var/www/TEST1. I am sure I am doing something stupid
> but I cannot figure it out. Please help if you can...
>
> Thanks!!!
>
> <VirtualHost xxx.xxx.xxx.xxx:80>
> DocumentRoot /var/www/TEST
> <Directory "/var/www/TEST">
> allow from all
> Options +Indexes
> </Directory>
> ServerName testing.mydomain.com
> UseCanonicalName off
> HostNameLookups on
> </VirtualHost>
>
> <VirtualHost xxx.xxx.xxx.xxx:80>
> DocumentRoot "/var/www/TEST1"
> ServerName testing1.mydomain.com
> <Directory "/var/www/TEST1">
> allow from all
> Options +Indexes
> </Directory>
> UseCanonicalName off
> HostNameLookups on
> </VirtualHost>
>
>

Do you have DNS setup for testing.mydomain.com and testing1.mydomain.com
Should not the DocumentRoot /var/www/TEST be with quotes ie:
DocumentRoot "/var/www/TEST"
  #3 (permalink)  
Old 09-15-2007
Rick
 
Posts: n/a
Default Re: Virtual Servers

Yes DNS is test up fine they both resolve to the same IP address. I will try
the quotes.

Thank you for taking the time to replay..



"David" <youcantoo@findmoore.net> wrote in message
news:fOidnYOWcIylFHbbnZ2dnUVZ_t2inZ2d@centurytel.n et...
> Rick wrote:
>> I want to create Virtual Server on my Apache 2 running on Linux. I am
>> very new to both Linux and Apache. I looked at the docs and this is what
>> I have in my apache2.conf I also tried this in my httpd.conf. When I
>> browse either testing.mydomain.com or testing1.mydomain.com I get the
>> files in /var/www/TEST never /var/www/TEST1. I am sure I am doing
>> something stupid but I cannot figure it out. Please help if you can...
>>
>> Thanks!!!
>>
>> <VirtualHost xxx.xxx.xxx.xxx:80>
>> DocumentRoot /var/www/TEST <Directory "/var/www/TEST">
>> allow from all
>> Options +Indexes
>> </Directory>
>> ServerName testing.mydomain.com
>> UseCanonicalName off
>> HostNameLookups on
>> </VirtualHost>
>>
>> <VirtualHost xxx.xxx.xxx.xxx:80>
>> DocumentRoot "/var/www/TEST1"
>> ServerName testing1.mydomain.com
>> <Directory "/var/www/TEST1">
>> allow from all
>> Options +Indexes
>> </Directory>
>> UseCanonicalName off
>> HostNameLookups on
>> </VirtualHost>

> Do you have DNS setup for testing.mydomain.com and testing1.mydomain.com
> Should not the DocumentRoot /var/www/TEST be with quotes ie: DocumentRoot
> "/var/www/TEST"



  #4 (permalink)  
Old 09-15-2007
Rick
 
Posts: n/a
Default Re: Virtual Servers

Sorry to say the quotes did not help.

Thank you though.....

>>

> Do you have DNS setup for testing.mydomain.com and testing1.mydomain.com
> Should not the DocumentRoot /var/www/TEST be with quotes ie: DocumentRoot
> "/var/www/TEST"



  #5 (permalink)  
Old 09-15-2007
Malcolm
 
Posts: n/a
Default Re: Virtual Servers

On Fri, 14 Sep 2007 16:55:33 -0700
"Rick" <rick@di-wave.com> wrote:

> I want to create Virtual Server on my Apache 2 running on Linux. I am
> very new to both Linux and Apache. I looked at the docs and this is
> what I have in my apache2.conf I also tried this in my httpd.conf.
> When I browse either testing.mydomain.com or testing1.mydomain.com I
> get the files in /var/www/TEST never /var/www/TEST1. I am sure I am
> doing something stupid but I cannot figure it out. Please help if you
> can...
>
> Thanks!!!

<snip>
Hi
My config uses a wildcard for the vhosts. Ports are done via the
ports.conf file
eg

NameVirtualHost *

# <site_1> vhost
<VirtualHost *>
ServerName www.site_1
ServerAlias site_1
DocumentRoot /var/www/site_1

<Directory "/var/www/site_1">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

# <site_2> vhost
<VirtualHost *>
ServerName www.site_2
ServerAlias site_2
DocumentRoot /var/www/site_2

<Directory "/var/www/site_2">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

--
Cheers Malcolm °¿° (Linux Counter #276890)
SLED 10.0 SP1 x86_64 Kernel 2.6.16.53-0.8-smp
up 5 days 15:52, 4 users, load average: 0.09, 0.11, 0.03
  #6 (permalink)  
Old 09-15-2007
Rick
 
Posts: n/a
Default Re: Virtual Servers

This still did not work. I am thinking maybe I have something else going on
in the configuration other that within the <VirtualHost *> section. Anyone
have any ideas?

Thanks very much for replying.....




"Malcolm" <malcolm_nospamlewis@bellsouth.net> wrote in message
news:20070915114256.03000168@oscar-sled.homeunix.net...
> On Fri, 14 Sep 2007 16:55:33 -0700
> "Rick" <rick@di-wave.com> wrote:
>
>> I want to create Virtual Server on my Apache 2 running on Linux. I am
>> very new to both Linux and Apache. I looked at the docs and this is
>> what I have in my apache2.conf I also tried this in my httpd.conf.
>> When I browse either testing.mydomain.com or testing1.mydomain.com I
>> get the files in /var/www/TEST never /var/www/TEST1. I am sure I am
>> doing something stupid but I cannot figure it out. Please help if you
>> can...
>>
>> Thanks!!!

> <snip>
> Hi
> My config uses a wildcard for the vhosts. Ports are done via the
> ports.conf file
> eg
>
> NameVirtualHost *
>
> # <site_1> vhost
> <VirtualHost *>
> ServerName www.site_1
> ServerAlias site_1
> DocumentRoot /var/www/site_1
>
> <Directory "/var/www/site_1">
> Options FollowSymLinks
> AllowOverride All
> Order allow,deny
> Allow from all
> </Directory>
> </VirtualHost>
>
> # <site_2> vhost
> <VirtualHost *>
> ServerName www.site_2
> ServerAlias site_2
> DocumentRoot /var/www/site_2
>
> <Directory "/var/www/site_2">
> Options FollowSymLinks
> AllowOverride All
> Order allow,deny
> Allow from all
> </Directory>
> </VirtualHost>
>
> --
> Cheers Malcolm °¿° (Linux Counter #276890)
> SLED 10.0 SP1 x86_64 Kernel 2.6.16.53-0.8-smp
> up 5 days 15:52, 4 users, load average: 0.09, 0.11, 0.03



  #7 (permalink)  
Old 09-15-2007
Malcolm
 
Posts: n/a
Default Re: Virtual Servers

On Sat, 15 Sep 2007 10:04:42 -0700
"Rick" <rick@di-wave.com> wrote:

> This still did not work. I am thinking maybe I have something else
> going on in the configuration other that within the <VirtualHost *>
> section. Anyone have any ideas?
>
> Thanks very much for replying.....
>
>
>
>
> "Malcolm" <malcolm_nospamlewis@bellsouth.net> wrote in message
> news:20070915114256.03000168@oscar-sled.homeunix.net...
> > On Fri, 14 Sep 2007 16:55:33 -0700
> > "Rick" <rick@di-wave.com> wrote:
> >
> >> I want to create Virtual Server on my Apache 2 running on Linux. I
> >> am very new to both Linux and Apache. I looked at the docs and
> >> this is what I have in my apache2.conf I also tried this in my
> >> httpd.conf. When I browse either testing.mydomain.com or
> >> testing1.mydomain.com I get the files in /var/www/TEST
> >> never /var/www/TEST1. I am sure I am doing something stupid but I
> >> cannot figure it out. Please help if you can...
> >>
> >> Thanks!!!

> > <snip>
> > Hi
> > My config uses a wildcard for the vhosts. Ports are done via the
> > ports.conf file
> > eg
> >
> > NameVirtualHost *
> >
> > # <site_1> vhost
> > <VirtualHost *>
> > ServerName www.site_1
> > ServerAlias site_1
> > DocumentRoot /var/www/site_1
> >
> > <Directory "/var/www/site_1">
> > Options FollowSymLinks
> > AllowOverride All
> > Order allow,deny
> > Allow from all
> > </Directory>
> > </VirtualHost>
> >
> > # <site_2> vhost
> > <VirtualHost *>
> > ServerName www.site_2
> > ServerAlias site_2
> > DocumentRoot /var/www/site_2
> >
> > <Directory "/var/www/site_2">
> > Options FollowSymLinks
> > AllowOverride All
> > Order allow,deny
> > Allow from all
> > </Directory>
> > </VirtualHost>
> >


Hi
So you are trying to access locally? If not running a local dns you
will need to add them into your hosts file from the machine you are
accessing from eg

xxx.xxx.xxx.xxx www.site_1 site_1 www.site_2 site_2

--
Cheers Malcolm °¿° (Linux Counter #276890)
SLED 10.0 SP1 x86_64 Kernel 2.6.16.53-0.8-smp
up 5 days 16:36, 3 users, load average: 0.09, 0.09, 0.10
  #8 (permalink)  
Old 09-15-2007
Rick
 
Posts: n/a
Default Re: Virtual Servers

I do understand what you are saying but no I am not local. But I do run our
own DNS. I know it is not a DNS issue the DNS server resolve the domain and
host names perfectly. But what is strange is I can access this from the IP
address also. http://65.60.100.66/ and I should not be able to do that
right?

Thanks ....

"Malcolm" <malcolm_nospamlewis@bellsouth.net> wrote in message
news:20070915122233.71aaa2a8@oscar-sled.homeunix.net...
> On Sat, 15 Sep 2007 10:04:42 -0700
> "Rick" <rick@di-wave.com> wrote:
>
>> This still did not work. I am thinking maybe I have something else
>> going on in the configuration other that within the <VirtualHost *>
>> section. Anyone have any ideas?
>>
>> Thanks very much for replying.....
>>
>>
>>
>>
>> "Malcolm" <malcolm_nospamlewis@bellsouth.net> wrote in message
>> news:20070915114256.03000168@oscar-sled.homeunix.net...
>> > On Fri, 14 Sep 2007 16:55:33 -0700
>> > "Rick" <rick@di-wave.com> wrote:
>> >
>> >> I want to create Virtual Server on my Apache 2 running on Linux. I
>> >> am very new to both Linux and Apache. I looked at the docs and
>> >> this is what I have in my apache2.conf I also tried this in my
>> >> httpd.conf. When I browse either testing.mydomain.com or
>> >> testing1.mydomain.com I get the files in /var/www/TEST
>> >> never /var/www/TEST1. I am sure I am doing something stupid but I
>> >> cannot figure it out. Please help if you can...
>> >>
>> >> Thanks!!!
>> > <snip>
>> > Hi
>> > My config uses a wildcard for the vhosts. Ports are done via the
>> > ports.conf file
>> > eg
>> >
>> > NameVirtualHost *
>> >
>> > # <site_1> vhost
>> > <VirtualHost *>
>> > ServerName www.site_1
>> > ServerAlias site_1
>> > DocumentRoot /var/www/site_1
>> >
>> > <Directory "/var/www/site_1">
>> > Options FollowSymLinks
>> > AllowOverride All
>> > Order allow,deny
>> > Allow from all
>> > </Directory>
>> > </VirtualHost>
>> >
>> > # <site_2> vhost
>> > <VirtualHost *>
>> > ServerName www.site_2
>> > ServerAlias site_2
>> > DocumentRoot /var/www/site_2
>> >
>> > <Directory "/var/www/site_2">
>> > Options FollowSymLinks
>> > AllowOverride All
>> > Order allow,deny
>> > Allow from all
>> > </Directory>
>> > </VirtualHost>
>> >

>
> Hi
> So you are trying to access locally? If not running a local dns you
> will need to add them into your hosts file from the machine you are
> accessing from eg
>
> xxx.xxx.xxx.xxx www.site_1 site_1 www.site_2 site_2
>
> --
> Cheers Malcolm °¿° (Linux Counter #276890)
> SLED 10.0 SP1 x86_64 Kernel 2.6.16.53-0.8-smp
> up 5 days 16:36, 3 users, load average: 0.09, 0.09, 0.10



  #9 (permalink)  
Old 09-17-2007
phantom
 
Posts: n/a
Default Re: Virtual Servers

"Rick" <rick@di-wave.com> wrote in message
news:46eb1f6e$0$19650$4c368faf@roadrunner.com...
>I want to create Virtual Server on my Apache 2 running on Linux. I am very
>new to both Linux and Apache. I looked at the docs and this is what I have
>in my apache2.conf I also tried this in my httpd.conf. When I browse either
>testing.mydomain.com or testing1.mydomain.com I get the files in
>/var/www/TEST never /var/www/TEST1. I am sure I am doing something stupid
>but I cannot figure it out. Please help if you can...
>
> Thanks!!!
>
> <VirtualHost xxx.xxx.xxx.xxx:80>
> DocumentRoot /var/www/TEST
> <Directory "/var/www/TEST">
> allow from all
> Options +Indexes
> </Directory>
> ServerName testing.mydomain.com
> UseCanonicalName off
> HostNameLookups on
> </VirtualHost>
>
> <VirtualHost xxx.xxx.xxx.xxx:80>
> DocumentRoot "/var/www/TEST1"
> ServerName testing1.mydomain.com
> <Directory "/var/www/TEST1">
> allow from all
> Options +Indexes
> </Directory>
> UseCanonicalName off
> HostNameLookups on
> </VirtualHost>


Do you have a
NameVirtualHost xxx.xxx.xxx.xxx:80

to match the address in the <VirtualHost> parts?


  #10 (permalink)  
Old 09-17-2007
Rick
 
Posts: n/a
Default Re: Virtual Servers

Thanks everyone for your help it is working now.

I really appreciate it!!

"Rick" <rick@di-wave.com> wrote in message
news:46eb1f6e$0$19650$4c368faf@roadrunner.com...
>I want to create Virtual Server on my Apache 2 running on Linux. I am very
>new to both Linux and Apache. I looked at the docs and this is what I have
>in my apache2.conf I also tried this in my httpd.conf. When I browse either
>testing.mydomain.com or testing1.mydomain.com I get the files in
>/var/www/TEST never /var/www/TEST1. I am sure I am doing something stupid
>but I cannot figure it out. Please help if you can...
>
> Thanks!!!
>
> <VirtualHost xxx.xxx.xxx.xxx:80>
> DocumentRoot /var/www/TEST
> <Directory "/var/www/TEST">
> allow from all
> Options +Indexes
> </Directory>
> ServerName testing.mydomain.com
> UseCanonicalName off
> HostNameLookups on
> </VirtualHost>
>
> <VirtualHost xxx.xxx.xxx.xxx:80>
> DocumentRoot "/var/www/TEST1"
> ServerName testing1.mydomain.com
> <Directory "/var/www/TEST1">
> allow from all
> Options +Indexes
> </Directory>
> UseCanonicalName off
> HostNameLookups on
> </VirtualHost>
>



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:57 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0