Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   several webs in teh same apache (http://www.linux-archive.org/debian-user/236000-several-webs-teh-same-apache.html)

Jesus arteche 01-28-2009 05:37 PM

several webs in teh same apache
 
Hello,


I'd like to know how i could redirect several webs to same Apache server, now what I've got is several webs in the same apache server, and i can access to them by the following way:





www.midomain.com/web1 --> acces to the web 1






www.midomain.com/web2 --> access to the web 2



...


and i'd like to be that way:








www.web1.midomain.com/ --> access to the web 1



www.web2.midominio.com/ --> access to the 2



The problem is that the 2 webs are in teh same Apache in the same machine with the same IP, I had tought that i can redirect to the apache by several ports...by how can i do that and haw can i do that* the client wont see the port i mean www.web1.mydomain.com:444...i dont want the client see the port.


thanks

edu gargiulo 01-28-2009 05:43 PM

several webs in teh same apache
 
On Wed, Jan 28, 2009 at 3:37 PM, Jesus arteche <chechu.linux@gmail.com> wrote:
[...]
>
> and i'd like to be that way:
>
> www.web1.midomain.com/ --> access to the web 1
>
> www.web2.midominio.com/ --> access to the 2

take a look at NameVirtualHost apache directive; you should tweak your
name server CNAME registers too.

regards,

--
edu


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Jochen Schulz 01-29-2009 08:30 AM

several webs in teh same apache
 
Jesus arteche:
>
> I'd like to know how i could redirect several webs to same Apache server,
> now what I've got is several webs in the same apache server, and i can
> access to them by the following way:

Your terminology is *really* weird. If you learn the common terms, it is
easier to help you.

> www.web1.midomain.com/ --> access to the web 1
>
> www.web2.midominio.com/ --> access to the 2

You need two VirtualHost sections in your configuration. Something like
this:

NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.web1.midomain.com
DocumentRoot /srv/www/web1
</VirtualHost>

<VirtualHost *:80>
ServerName www.web2.midomain.com
DocumentRoot /srv/www/web2
</VirtualHost>

> The problem is that the 2 webs are in teh same Apache in the same machine
> with the same IP, I had tought that i can redirect to the apache by several
> ports...by how can i do that and haw can i do that the client wont see the
> port i mean www.web1.mydomain.com:444...i dont want the client see the port.

HTTP clients send a special header to the server which mentions which
domain name they want to talk to. Apache simply dispatches requests
according to this name. No need for distinct ports.

J.
--
A passionate argument means more to me than a blockbuster movie.
[Agree] [Disagree]
<http://www.slowlydownward.com/NODATA/data_enter2.html>


All times are GMT. The time now is 01:27 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.