You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jim Hadfield <jh...@oldihc.org> on 2002/07/09 06:02:03 UTC
sub-domains
I am trying to set up dev.snowbankih.tzo.com in the /dev directory.
I've been through the docs and below is the way I understand it. But, when
I try to go to dev.snowbankih.tzo.com, I get into the root of the website
which is www.snowbankih.tzo.com
I know there is something realy simple that I am doing wrong. Can anyone
help?
Jim
NameVirtualHost 208.38.91.74
<VirtualHost 208.38.91.74>
#primary vhost
DocumentRoot /var/www/html/snowbankih
RewriteEngine On
RewriteRule ^/.* /www/html/snowbankih/index.php
DirectoryIndex index.php index.htm index.html
Options +ExecCGI FollowSymLinks SymLinksIfOwnerMatch
ServerAdmin jhadfiel@oldihc.org
ErrorLog snowbankih-error.log
CustomLog snowbankih-access.log common
IndexOptions
ScriptAlias /cgi-bin /var/www/html/snowbankih/cgi-bin
<Directory "/var/www/html/snowbankih/cgi-bin">
AllowOverride None
Order allow,deny
Allow from all
Options Indexes FollowSymLinks MultiViews ExecCGI
AddHandler cgi-script .cgi .pl
</Directory>
</VirtualHost>
<VirtualHost 208.38.91.74>
DocumentRoot /var/www/html/snowbankih/dev
ServerName dev.snowbankih.tzo.com
ServerPath /dev/
RewriteEngine On
RewriteRule ^(/dev/.*) /www/html/snowbankih$1
DirectoryIndex index.php index.htm index.html
ServerAdmin jhadfiel@oldihc.org
</VirtualHost>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: sub-domains
Posted by Jim Hadfield <jh...@oldihc.org>.
Zac,
sorry for the delay. I got involved in too many projects...
a ping to dev.snowbankih.tzo.com results in my IP. Also, if you click on
www.dev.snowbankih.tzo.com it will take you to my server. It just takes you
to www.snowbankih.tzo.com though. So, I am thinking there is something
wrong in the way I have apache configured.
see existing config below...
Jim
> -----Original Message-----
> From: Zac Stevens [mailto:zts@cryptocracy.com]
> > My understanding of the Apache docs tells me that I should be
> able to create
> > dev.snowbankih.tzo.com or whatever.snowbankih.tzo.com without having to
> > register each name, but by adding the appropriate directory and making a
> > change like I did in httpd.conf
>
> The Apache docs really only cover the Apache end of things. You
> still need
> to configure the appropriate entries in DNS.
>
> If you haven't setup a DNS 'A' or 'CNAME' record for the alternate sites
> (ie, dev.snowbankih.tzo.com) you will typically get some sort of "Hostname
> not found" message. The fact that you're getting something back from the
> webserver implies that you do have something configured in DNS for that
> hostname.
>
> One way to check this is to use "ping dev.snowbankih.tzo.com" from the
> commandline. The output of this command should report the IP
> address it is
> pinging - this address should match the one specified in your
> NameVirtualHost and <Virtualhost> directives.
NameVirtualHost 208.38.91.74
<VirtualHost 208.38.91.74>
#primary vhost
DocumentRoot /var/www/html/snowbankih
RewriteEngine On
RewriteRule ^/.* /www/html/snowbankih/index.php
DirectoryIndex index.php index.htm index.html
Options +ExecCGI FollowSymLinks SymLinksIfOwnerMatch
ServerAdmin jhadfiel@oldihc.org
ErrorLog snowbankih-error.log
CustomLog snowbankih-access.log common
IndexOptions
ScriptAlias /cgi-bin /var/www/html/snowbankih/cgi-bin
<Directory "/var/www/html/snowbankih/cgi-bin">
AllowOverride None
Order allow,deny
Allow from all
Options Indexes FollowSymLinks MultiViews ExecCGI
AddHandler cgi-script .cgi .pl
</Directory>
</VirtualHost>
<VirtualHost 208.38.91.74>
DocumentRoot /var/www/html/snowbankih/dev
ServerName www.dev.snowbankih.tzo.com
ServerPath /dev/
RewriteEngine On
RewriteRule ^(/dev/.*) /www/html/snowbankih$1
DirectoryIndex index.php index.htm index.html
ServerAdmin jhadfiel@oldihc.org
</VirtualHost>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: sub-domains
Posted by Zac Stevens <zt...@cryptocracy.com>.
On Mon, Jul 08, 2002 at 11:19:32PM -0500, Jim Hadfield wrote:
> snowbankih.tzo.com is the normal address.
>
> My understanding of the Apache docs tells me that I should be able to create
> dev.snowbankih.tzo.com or whatever.snowbankih.tzo.com without having to
> register each name, but by adding the appropriate directory and making a
> change like I did in httpd.conf
The Apache docs really only cover the Apache end of things. You still need
to configure the appropriate entries in DNS.
If you haven't setup a DNS 'A' or 'CNAME' record for the alternate sites
(ie, dev.snowbankih.tzo.com) you will typically get some sort of "Hostname
not found" message. The fact that you're getting something back from the
webserver implies that you do have something configured in DNS for that
hostname.
One way to check this is to use "ping dev.snowbankih.tzo.com" from the
commandline. The output of this command should report the IP address it is
pinging - this address should match the one specified in your
NameVirtualHost and <Virtualhost> directives.
Zac
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: sub-domains
Posted by Lewis Watson <li...@visionsix.com>.
----- Original Message -----
From: "Jim Hadfield" <jh...@oldihc.org>
To: <us...@httpd.apache.org>
Sent: Monday, July 08, 2002 11:19 PM
Subject: RE: sub-domains
> snowbankih.tzo.com is the normal address.
>
> My understanding of the Apache docs tells me that I should be able to
create
> dev.snowbankih.tzo.com or whatever.snowbankih.tzo.com without having to
> register each name, but by adding the appropriate directory and making a
> change like I did in httpd.conf
>
> Jim
I think that for it to be correct, and properly work that your DNS server
should be aware of any subdomains. By saying 'register' are you refering to
registering a domain such as tzo.com or registering the subdomain in DNS?
For this to work properly you have to have each subdomain specified in your
DNS record...
maybe this helps...
Lewis Watson
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: sub-domains
Posted by Jim Hadfield <jh...@oldihc.org>.
snowbankih.tzo.com is the normal address.
My understanding of the Apache docs tells me that I should be able to create
dev.snowbankih.tzo.com or whatever.snowbankih.tzo.com without having to
register each name, but by adding the appropriate directory and making a
change like I did in httpd.conf
Jim
> -----Original Message-----
> Generally speaking you should be able to strip the ServerPath and Rewrite*
> directives from the above configuration and things should work, provided
> dev.snowbankih.tzo.com points to 208.38.91.74
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: sub-domains
Posted by Zac Stevens <zt...@cryptocracy.com>.
Hi Jim,
On Mon, Jul 08, 2002 at 11:02:03PM -0500, Jim Hadfield wrote:
> <VirtualHost 208.38.91.74>
> DocumentRoot /var/www/html/snowbankih/dev
> ServerName dev.snowbankih.tzo.com
> ServerPath /dev/
> RewriteEngine On
> RewriteRule ^(/dev/.*) /www/html/snowbankih$1
> DirectoryIndex index.php index.htm index.html
> ServerAdmin jhadfiel@oldihc.org
>
> </VirtualHost>
You only need to use the ServerPath tricks if you need to support old
clients which do not support HTTP/1.1 Name Based Virtual Hosts
Generally speaking you should be able to strip the ServerPath and Rewrite*
directives from the above configuration and things should work, provided
dev.snowbankih.tzo.com points to 208.38.91.74
I'd suggest starting with the cut down configuration and get the base
functionality working first. Then, if you need it, add the ServerPath
stuff in.
Hope that helps,
Zac
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org