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

One Virtual Host listening on several Domain names?

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  SSL configuration  
Author Message
dcahhnospam

External


Since: Oct 09, 2003
Posts: 9



(Msg. 1) Posted: Tue Feb 03, 2004 12:46 pm
Post subject: One Virtual Host listening on several Domain names?
Archived from groups: alt>apache>configuration (more info?)

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, listening on Domain-
Names like another-company.de, xyz.de and so on - which works fine.

I could of course configure 3 further Virtual Hosts for our-company.xyz
domains, but is it necessary? I thought the directive "ServerAlias our-
company.de our-company.com our-company.net" would do the trick, but it
does'nt (no matter if aliases are written with or without leading <a style='text-decoration: underline;' href="http://www." target="_blank">www.</a>)

<VirtualHost *>
<font color=purple>  ServerName <a style='text-decoration: underline;' href="http://www.our.company.de</font" target="_blank">www.our.company.de</font</a>>
<font color=purple>  ServerAlias <a style='text-decoration: underline;' href="http://www.our-company.de" target="_blank">www.our-company.de</a> <a style='text-decoration: underline;' href="http://www.our-company.net" target="_blank">www.our-company.net</a> <a style='text-decoration: underline;' href="http://www.our-</font" target="_blank">www.our-</font</a>>
company.com
  [...]

Any help appreciated...

Thanks,
Denis<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: One Virtual Host listening on several Domain names? 
Back to top
Login to vote
ian6

External


Since: Dec 03, 2003
Posts: 27



(Msg. 2) Posted: Tue Feb 03, 2004 1:33 pm
Post subject: Re: One Virtual Host listening on several Domain names? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Tue, 03 Feb 2004 09:46:17 +0000, Denis Campbell wrote:

 > I could of course configure 3 further Virtual Hosts for our-company.xyz
 > domains, but is it necessary? I thought the directive "ServerAlias our-
 > company.de our-company.com our-company.net" would do the trick, but it
 > does'nt (no matter if aliases are written with or without leading <a style='text-decoration: underline;' href="http://www." target="_blank">www.</a>)
 >
 > <VirtualHost *>
<font color=green>  > ServerName <a style='text-decoration: underline;' href="http://www.our.company.de</font" target="_blank">www.our.company.de</font</a>>
<font color=green>  > ServerAlias <a style='text-decoration: underline;' href="http://www.our-company.de" target="_blank">www.our-company.de</a> <a style='text-decoration: underline;' href="http://www.our-company.net" target="_blank">www.our-company.net</a> <a style='text-decoration: underline;' href="http://www.our-</font" target="_blank">www.our-</font</a>>
 > company.com
  > [...]
 >
 > Any help appreciated...


You're almost right (well, you are, just looks like the syntax is wrong
slightly).


ServerName our-company.net
ServerAlias <a style='text-decoration: underline;' href="http://www.our-company.net" target="_blank">www.our-company.net</a>
ServerAlias our-company.de
ServerAlias <a style='text-decoration: underline;' href="http://www.our-company.de" target="_blank">www.our-company.de</a>


etc etc.

TBH, I don't know if you can / can't specify more than one domain in the
ServerAlias directive (I don't _think_ so).. but the above method has
always worked just fine for me =)


HTH.



Regards,

Ian

--
Ian.H
digiServ Network
London, UK
<a style='text-decoration: underline;' href="http://digiserv.net/" target="_blank">http://digiserv.net/</a><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: One Virtual Host listening on several Domain names? 
Back to top
Login to vote
dcahhnospam

External


Since: Oct 09, 2003
Posts: 9



(Msg. 3) Posted: Tue Feb 03, 2004 1:45 pm
Post subject: Re: One Virtual Host listening on several Domain names? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Ian.H" schrieb:

 > On Tue, 03 Feb 2004 09:46:17 +0000, Denis Campbell wrote:
 >
  > > I could of course configure 3 further Virtual Hosts for
  > > our-company.xyz domains, but is it necessary? I thought the
  > > directive "ServerAlias our- company.de our-company.com
  > > our-company.net" would do the trick, but it does'nt (no matter if
  > > aliases are written with or without leading <a style='text-decoration: underline;' href="http://www." target="_blank">www.</a>)
  > >
  > > <VirtualHost *>
<font color=brown>   > > ServerName <a style='text-decoration: underline;' href="http://www.our.company.de</font" target="_blank">www.our.company.de</font</a>>
<font color=brown>   > > ServerAlias <a style='text-decoration: underline;' href="http://www.our-company.de" target="_blank">www.our-company.de</a> <a style='text-decoration: underline;' href="http://www.our-company.net" target="_blank">www.our-company.net</a> <a style='text-decoration: underline;' href="http://www.our-</font" target="_blank">www.our-</font</a>>
  > > company.com
   > > [...]
  > >
  > > Any help appreciated...
 >
 >
 > You're almost right (well, you are, just looks like the syntax is
 > wrong slightly).
 >
 >
 > ServerName our-company.net
<font color=purple> > ServerAlias <a style='text-decoration: underline;' href="http://www.our-company.net</font" target="_blank">www.our-company.net</font</a>>
 > ServerAlias our-company.de
<font color=purple> > ServerAlias <a style='text-decoration: underline;' href="http://www.our-company.de</font" target="_blank">www.our-company.de</font</a>>
 >
 >
 > etc etc.
 >
 > TBH, I don't know if you can / can't specify more than one domain in
 > the ServerAlias directive (I don't _think_ so).. but the above
 > method has always worked just fine for me =)
 >
 >
 > HTH.
 >
 >
 >
 > Regards,
 >
 > Ian
 >

....hm, unfortunately only the server response changes from 502 Server
Down to 404 not found when adding the 3 domains in seperate ServerAlias
directives (again no matter if added with/without leading www).

When restarting Apache there's an warning:
NameVirtualHost <a style='text-decoration: underline;' href="http://www.our-company.com:0" target="_blank">www.our-company.com:0</a> has no VirtualHosts
What does that mean?
Can you imagine any resulting misconfiguration?

Thank you,
Denis<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: One Virtual Host listening on several Domain names? 
Back to top
Login to vote
dcahhnospam

External


Since: Oct 09, 2003
Posts: 9



(Msg. 4) Posted: Tue Feb 03, 2004 1:59 pm
Post subject: Re: One Virtual Host listening on several Domain names? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Denis Campbell" schrieb:

 >
 > When restarting Apache there's an warning:
 > NameVirtualHost <a style='text-decoration: underline;' href="http://www.our-company.com:0" target="_blank">www.our-company.com:0</a> has no VirtualHosts
 > What does that mean?
 > Can you imagine any resulting misconfiguration?

That error ocurred due to a mistake by myself, I'm sorry.
Further, I found that our domains are *now* reachable after accessing
the internet via ISDN and not via our local LAN.

So, your hint was quite helpfull, thanks a lot!

Cheers,
Denis

BTW: due to that page <a style='text-decoration: underline;' href="http://httpd.apache.org/docs-" target="_blank">http://httpd.apache.org/docs-</a>
2.0/en/mod/core.html#serveralias I thought that adding aliases on one
line is allowed - but indeed it works only when adding seperate
ServerAlias directives to a Virtual Host<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: One Virtual Host listening on several Domain names? 
Back to top
Login to vote
ian6

External


Since: Dec 03, 2003
Posts: 27



(Msg. 5) Posted: Tue Feb 03, 2004 4:34 pm
Post subject: Re: One Virtual Host listening on several Domain names? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Tue, 03 Feb 2004 10:59:12 +0000, Denis Campbell wrote:

 > "Denis Campbell" schrieb:
 >
 >
  >> When restarting Apache there's an warning: NameVirtualHost
  >> <a style='text-decoration: underline;' href="http://www.our-company.com:0" target="_blank">www.our-company.com:0</a> has no VirtualHosts What does that mean?
  >> Can you imagine any resulting misconfiguration?
 >
 > That error ocurred due to a mistake by myself, I'm sorry. Further, I found
 > that our domains are *now* reachable after accessing the internet via ISDN
 > and not via our local LAN.
 >
 > So, your hint was quite helpfull, thanks a lot!
 >
 > Cheers,
 > Denis
 >
<font color=purple> > BTW: due to that page <a style='text-decoration: underline;' href="http://httpd.apache.org/docs-</font" target="_blank">http://httpd.apache.org/docs-</font</a>>
 > 2.0/en/mod/core.html#serveralias I thought that adding aliases on one line
 > is allowed - but indeed it works only when adding seperate ServerAlias
 > directives to a Virtual Host


Hi Dennis..

Glad all's working as expected now =)

Can't say I've checked the docs for that.. but might be worth dropping the
Apache lads a mail regarding that section of their docs explaining the
confusion you fell upon.. maybe they're restructure it slightly to be
useful for future people possibly finding themselves in a similar
situation.



Regards,

Ian

--
Ian.H
digiServ Network
London, UK
<a style='text-decoration: underline;' href="http://digiserv.net/" target="_blank">http://digiserv.net/</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: One Virtual Host listening on several Domain names? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Apache Listening on 443 only - Hi, I configured the httpd.conf file on a brand new install of RH 9 machine and found that Apache is listening on port 443 only, what could be the cause of this? I tried to change the Listen directive and that didn't seem help. Thanks, Yang

virtual host - Hi, I'm a newbie on Apache, so I need help for the configuration of Virtual Hosts. My english is bad, I'm sorry and I hope you can understand me... I've seen the documentation and I've tried many times but my configuration doesn't works... I've a lots....

Virtual Host - Does anyone have any idea why this isn't working? The following virtual host info in my httpd.conf works when I have someone try it from my IP (I assume cause it's the default ), but not when I try the domain www.mysite.com or it's aliases. ..

Virtual host and cgi Help - iam running slackware 9.0 and apache1.3 webserver. i have set up virtualhost, and have 2 domains on my server, one of my domains(mydoamin2) canīt execute cgi, the other can. I get this in my error.log "Options execCGI is off in this directory"...

Virtual host - Redhat 9.0 [root@linux bin]# ./apachectl start [Sun Aug 17 11:53:43 2003] [warn] module mod_php4.c is already added, skipping [Sun Aug 17 11:53:43 2003] [warn] module php4_module is already loaded, skipping [Sun Aug 17 11:53:43 2003] [warn] VirtualHost....
   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 ]