Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Apache virtual domain isse

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Apache and Server 2003  
Author Message
nospam217

External


Since: Jun 20, 2004
Posts: 6



(Msg. 1) Posted: Sun Jun 20, 2004 6:59 pm
Post subject: Apache virtual domain isse
Archived from groups: alt>apache>configuration (more info?)

Hi,

I have enabled virtual domain support for my Apache 1.3.

First set this:

#
# If you want to use name-based virtual hosts you need to define at
# least one IP address (and port number) for them.
#
#NameVirtualHost 12.34.56.78:80
NameVirtualHost ***.***.***.***

Then I added a first virtual domain:

<VirtualHost ***.***.***.***.mydomain.de>
ServerAdmin webmaster DeleteThis @mydomain.de
DocumentRoot /var/www/mydomain.de
ServerName myserver
ErrorLog /var/log/apache/mydomain.de-error.log
CustomLog /var/log/apache/mydomain.de-access.log common
</VirtualHost>

So far, that works fine...
What I want now is that when I invoke my IP ***.***.***.*** that I am
directed to /var/www and not to /var/www/mydomain, but for some reason I am
always redirected to the document root of mydomain.de then...

Any suggestions ?

Thanks.

 >> Stay informed about: Apache virtual domain isse 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 2) Posted: Sun Jun 20, 2004 6:59 pm
Post subject: Re: Apache virtual domain isse [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Alexander Schmidt <nospam.TakeThisOut@web.de> wrote:
 > NameVirtualHost ***.***.***.***
 > <VirtualHost ***.***.***.***.mydomain.de>

You better read the documentation and have a look at the various
examples. Note: the examples that are in the stock configuration
files DO WORKS. In a pinch: you CANNOT mix-up an IP number and a
domain name.

Davide

--
| Experience is what you get when you were expecting something else.
|
|
|<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Apache virtual domain isse 
Back to top
Login to vote
nospam217

External


Since: Jun 20, 2004
Posts: 6



(Msg. 3) Posted: Sun Jun 20, 2004 7:39 pm
Post subject: Re: Apache virtual domain isse [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Davide Bianchi" <davideyeahsure.RemoveThis@onlyforfun.net> wrote in message
news:2jlk6nF12gsojU4@uni-berlin.de...
 > Alexander Schmidt <nospam.RemoveThis@web.de> wrote:
  > > NameVirtualHost ***.***.***.***
  > > <VirtualHost ***.***.***.***.mydomain.de>
 >
 > You better read the documentation and have a look at the various
 > examples. Note: the examples that are in the stock configuration
 > files DO WORKS. In a pinch: you CANNOT mix-up an IP number and a
 > domain name.
 >
 > Davide

Okay, works fine now, but is it possible to make my domain mydomain
reachable as a virtual host via <a style='text-decoration: underline;' href="http://www.mydoma" target="_blank">www.mydoma</a>ín.tld and mydomain.tld ?
Currently I have set up Server Name as <a style='text-decoration: underline;' href="http://www.mydomain.tld" target="_blank">www.mydomain.tld</a> and so mydomain.tld
is not routed ?

Thanks.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache virtual domain isse 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 4) Posted: Sun Jun 20, 2004 7:39 pm
Post subject: Re: Apache virtual domain isse [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Alexander Schmidt <nospam RemoveThis @web.de> wrote:
 > reachable as a virtual host via <a style='text-decoration: underline;' href="http://www.mydoma?n.tld" target="_blank">www.mydoma?n.tld</a> and mydomain.tld ?

Sure, just configure your DNS to have *.mydomain.tld (* = jolly for
everything) pointing to the same IP.

Davide

--
| Kinkler's First Law: Responsibility always exceeds authority.
|
|
|<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache virtual domain isse 
Back to top
Login to vote
nospam217

External


Since: Jun 20, 2004
Posts: 6



(Msg. 5) Posted: Sun Jun 20, 2004 7:55 pm
Post subject: Re: Apache virtual domain isse [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Davide Bianchi" <davideyeahsure.TakeThisOut@onlyforfun.net> wrote in message
news:2jlm9kF121583U1@uni-berlin.de...
 > Alexander Schmidt <nospam.TakeThisOut@web.de> wrote:
  > > reachable as a virtual host via <a style='text-decoration: underline;' href="http://www.mydoma?n.tld" target="_blank">www.mydoma?n.tld</a> and mydomain.tld ?
 >
 > Sure, just configure your DNS to have *.mydomain.tld (* = jolly for
 > everything) pointing to the same IP.

Fine... stupid question since I have no experience with DNS setup:
Where (which config files) and how to do that ?

Thanks.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache virtual domain isse 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 6) Posted: Sun Jun 20, 2004 7:55 pm
Post subject: Re: Apache virtual domain isse [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Alexander Schmidt <nospam.DeleteThis@web.de> wrote:
 > Fine... stupid question since I have no experience with DNS setup:
 > Where (which config files) and how to do that ?

Is not in Apache. If you have a DNS is configured somewhere in your
OS (that you didn't specified).

Davide

--
| Bringing computers into the home won't change either one, but may
| revitalize the corner saloon.
|
|<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache virtual domain isse 
Back to top
Login to vote
nospam217

External


Since: Jun 20, 2004
Posts: 6



(Msg. 7) Posted: Sun Jun 20, 2004 8:20 pm
Post subject: Re: Apache virtual domain isse [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Davide Bianchi" <davideyeahsure.DeleteThis@onlyforfun.net> wrote in message
news:2jlo0tF121583U3@uni-berlin.de...
 > Alexander Schmidt <nospam.DeleteThis@web.de> wrote:
  > > Fine... stupid question since I have no experience with DNS setup:
  > > Where (which config files) and how to do that ?
 >
 > Is not in Apache. If you have a DNS is configured somewhere in your
 > OS (that you didn't specified).
 >
 > Davide

I have a Debian system with preinstalled bind9 (I think).
So interesting files may be located in /etc/bind/*, right ?

Which ones do I have to touch ?
What to enter there ?

What I want to do is the following:

1.
Not only <a style='text-decoration: underline;' href="http://www.mydomain.tld" target="_blank">www.mydomain.tld</a> should be routed to /var/www/mydomain/
Also mydomain.tld should be routed to there...

2.
Every time someine enters a URL starting with webmail, so
webmail.mydomain.tld or webmail.anotherdomain.tld he should be directed to
/var/www/squirrelmail/
I guess that is possible, too.

I have never done sth with nameserver handling etc.
Maybe you can point me to the right place or tell me what to do...

Thanks a lot.
Of course, Linux knowledge is there...

Regards<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache virtual domain isse 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 8) Posted: Sun Jun 20, 2004 8:20 pm
Post subject: Re: Apache virtual domain isse [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Alexander Schmidt <nospam RemoveThis @web.de> wrote:
 > I have a Debian system with preinstalled bind9 (I think).
 > So interesting files may be located in /etc/bind/*, right ?

I think so. I'm not aware of exactly where debian put the standard
configuration of Bind, but you should be able to find them pretty
easily looking at your initialization scripts in /etc/rc.d or /etc/init.d
or wherever debian put them (surely in /etc/).

 > Which ones do I have to touch ?

You'd better read the DNS-HOWTO on <a style='text-decoration: underline;' href="http://www.tldp.org." target="_blank">www.tldp.org.</a> Basically is a matter
of adding an entry to the db.your.ip.address then changing the
'serial' number and waking up named. Do make a copy of the configuration
files before editing (always have a backup plan!).

 > Every time someine enters a URL starting with webmail, so

This is something you handle in Apache using the ServerAlias
directive in the VHost. This way a single VHost can answer to multiple
names.

Davide

--
| Acid -- better living through chemistry.
|
|
|<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache virtual domain isse 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 9) Posted: Sun Jun 20, 2004 8:20 pm
Post subject: Re: Apache virtual domain isse [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Alexander Schmidt <nospam DeleteThis @web.de> wrote:
 > Funny, you just gave me the solution how to do what I want without changing
 > DNS things:

Yes, but notice that it works only if <a style='text-decoration: underline;' href="http://www.wathever.tld" target="_blank">www.wathever.tld</a> and wathever.tld
are both resolved to the same IP. And this resolution is done by the DNS.
So if your dns is already Ok, then you're set.

Davide

--
| It has been said that man is a rational animal. All my life I have
| been searching for evidence which could support this.
|
|<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache virtual domain isse 
Back to top
Login to vote
nospam217

External


Since: Jun 20, 2004
Posts: 6



(Msg. 10) Posted: Sun Jun 20, 2004 8:50 pm
Post subject: Re: Apache virtual domain isse [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Davide Bianchi" <davideyeahsure.RemoveThis@onlyforfun.net> wrote in message
news:2jlopiF121583U4@uni-berlin.de...
 > Alexander Schmidt <nospam.RemoveThis@web.de> wrote:
  > > I have a Debian system with preinstalled bind9 (I think).
  > > So interesting files may be located in /etc/bind/*, right ?
 >
 > I think so. I'm not aware of exactly where debian put the standard
 > configuration of Bind, but you should be able to find them pretty
 > easily looking at your initialization scripts in /etc/rc.d or /etc/init.d
 > or wherever debian put them (surely in /etc/).
 >
  > > Which ones do I have to touch ?
 >
 > You'd better read the DNS-HOWTO on <a style='text-decoration: underline;' href="http://www.tldp.org." target="_blank">www.tldp.org.</a> Basically is a matter
 > of adding an entry to the db.your.ip.address then changing the
 > 'serial' number and waking up named. Do make a copy of the configuration
 > files before editing (always have a backup plan!).
 >
  > > Every time someine enters a URL starting with webmail, so
 >
 > This is something you handle in Apache using the ServerAlias
 > directive in the VHost. This way a single VHost can answer to multiple
 > names.
 >
 > Davide
 >
 > --
 > | Acid -- better living through chemistry.
 > |
 > |
 > |

Funny, you just gave me the solution how to do what I want without changing
DNS things:

# Per default go to /var/www

<VirtualHost ***.***.***.***>
ServerAdmin webmaster.RemoveThis@default.tld
DocumentRoot /var/www/
ServerName default.tld
ErrorLog /var/log/apache/default.tld-error.log
CustomLog /var/log/apache/default.tld-access.log common
</VirtualHost>

# Catch everything starting with webmail.* (do this before everything else)
<VirtualHost ***.***.***.***>
ServerAdmin webmaster.RemoveThis@default.tld
DocumentRoot /var/www/squirrelmail
ServerName webmail.default.tld
ServerAlias webmail.*
ErrorLog /var/log/apache/squirrelmail-error.log
CustomLog /var/log/apache/squirrelmail-access.log common
</VirtualHost>

# Catch everything for mydomain.tld (www.*, xyz.*), except webmail.* (see
above)

<VirtualHost ***.***.***.***>
ServerAdmin webmaster.RemoveThis@mydomain.tld
DocumentRoot /var/www/mydomain.tld
ServerName mydomain.tld
ServerAlias *.mydomain.tld
ErrorLog /var/log/apache/mydomain.tld-error.log
CustomLog /var/log/apache/mydomain.tld-access.log common
</VirtualHost>

Thank you !<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache virtual domain isse 
Back to top
Login to vote
nospam217

External


Since: Jun 20, 2004
Posts: 6



(Msg. 11) Posted: Sun Jun 20, 2004 10:20 pm
Post subject: Re: Apache virtual domain isse [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Davide Bianchi" <davideyeahsure.TakeThisOut@onlyforfun.net> wrote in message
news:2jlt9iF131nrkU1@uni-berlin.de...
 > Alexander Schmidt <nospam.TakeThisOut@web.de> wrote:
  > > Funny, you just gave me the solution how to do what I want without
changing
  > > DNS things:
 >
 > Yes, but notice that it works only if <a style='text-decoration: underline;' href="http://www.wathever.tld" target="_blank">www.wathever.tld</a> and wathever.tld
 > are both resolved to the same IP. And this resolution is done by the DNS.
 > So if your dns is already Ok, then you're set.

Yes, *.whatever.tld seem all to be resolved to the same IP Wink
So, I am set...

Thanks for your help !<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache virtual domain isse 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Virtual Domain - Hi All In apache 2 how do you get Virtual Hosts working, I have got it running in Apache 1.4 but it wont work in Apache2 at all -- Regards CK www.networkingbasics.co.uk ****PLEASE USE ROT13 TO SEE MY EMAIL ADDRESS******

Virtual Domain timeout - I have one virtual site on Apache that needs a timeout much longer than the 300 second default for Apache. I really don't want to increase the timeout for all the virtual hosts though. Can the timeout be put in the virtual host section so it will..

Virtual Domain setup question - Greetings, I am setting up a Fedora server, and trying to configure Virtual Hosts via Apache that ships with the Fedora. I kindof got it working, but not quite. I have it setup with the default server, a 1 virtual host at the moment configured as a..

One Virtual Host listening on several Domain names? - Hi, I would like to configure our Apache to respond to several domains (i.e. our-company.de, our-company.com, our-company.net), which are all pointing to one IP, on which the Apache is listening. The Apache is setup up with several Virtual Hosts,..

Virtual Domain and host info in http request - As you know, if you had seen my previous pleas for help regarding virtual hosts, I cannot get virtual hosts to work at all. From what I undertstand (I am learning far more than I ever wanted to know about this, please forgive my ignorance.), the way..
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]