FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 02-16-2009, 08:26 PM
Zach Uram
 
Default setting up vhost for external DNS?

I wish to take over a wiki so I am setting it up on my machine however
it will use the DNS hosted by someone else so they will setup a CNAME
record pointing "wiki.foo.org" to my machine's ip. I have no control
over foo.org.

So how exactly should I set up the name based vhost in apache or
should I use ip based vhost and how would that look? My site hosted on
the VPS is www.jesujuva.org but I don't want that to appear in the
users' browsers, if they enter http://wiki.foo.org it should take them
to the wiki hostesd on my machine.

I was going to us something like this for name-based vhost:

/etc/apache2/sites-available/wiki

<VirtualHost *:80>
ServerName wiki.foo.org
ServerAlias wiki.foo.org
DocumentRoot /var/www/wiki
ErrorLog /var/log/apache2/error.log
TransferLog /var/log/apache2/access.log
</VirtualHost>

Zach


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-16-2009, 08:59 PM
Jochen Schulz
 
Default setting up vhost for external DNS?

Zach Uram:
>
> I wish to take over a wiki so I am setting it up on my machine however
> it will use the DNS hosted by someone else so they will setup a CNAME
> record pointing "wiki.foo.org" to my machine's ip. I have no control
> over foo.org.
>
> So how exactly should I set up the name based vhost in apache or
> should I use ip based vhost and how would that look?

Whether to use IP-based or name-based virtual hosts doesn't matter in
your case. If you have a spare IP address, you can use the former, but
you can always use the latter.

> I was going to us something like this for name-based vhost:
>
> /etc/apache2/sites-available/wiki
>
> <VirtualHost *:80>
> ServerName wiki.foo.org
> ServerAlias wiki.foo.org
> DocumentRoot /var/www/wiki
> ErrorLog /var/log/apache2/error.log
> TransferLog /var/log/apache2/access.log
> </VirtualHost>

That looks fine. Just don't forget to set something like
'NameVirtualHost *:80". And your ServerAlias is redundant.

J.
--
The houses of parliament make me think of school bullies.
[Agree] [Disagree]
<http://www.slowlydownward.com/NODATA/data_enter2.html>
 

Thread Tools




All times are GMT. The time now is 06:07 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org