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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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> |
|
|||
|
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" |
|
|||
|
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" |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
"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? |
|
|||
|
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> > |