httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <Owen.Bo...@swx.com>
Subject RE: Install 2 apache in one server
Date Mon, 22 Jul 2002 08:39:51 GMT
Err... when I said "ip" I meant to use your actual IP address (i.e. 213.186.37.72)...

I don't really understand what you are trying to achieve. You are mixing up port-based virtual-hosts,
name-based virtual-hosts and multiple instances of apache. Briefly:

You can have name-based VHing (one IP, one port, one apache, only one Listen, need NameVirtualHost):

NameVirtualHost 213.186.37.72:80
Listen 213.186.37.72:80
<VirtualHost 213.186.37.72:80>
  ServerName www1
  DocumentRoot /path/to/www1
  ...
<VirtualHost 213.186.37.72:80>
  ServerName www2
  DocumentRoot /path/to/www2
  ...

etc...

You can have port based VHing (one IP, many ports, one apache, many Listens, no NameVirtualHost):

Listen 213.186.37.72:80
<VirtualHost 213.186.37.72:80>
  ServerName www1
  DocumentRoot /path/to/www1
  ...
Listen 213.186.37.72:8000
<VirtualHost 213.186.37.72:8000>
  ServerName www2
  DocumentRoot /path/to/www2
  ...

etc...

You can have several apaches (one IP, one port per apache, one Listen per apache, no NameVirtualHost,
no VirtualHosts)

httpd.conf1:

Listen 213.186.37.72:80
ServerName www1
DocumentRoot /path/to/www1

httpd.conf2:

Listen 213.186.37.72:8000
ServerName www2
DocumentRoot /path/to/www2

Each arrangement has its own advantages and disadvantages - which is best for you depends
on what you are trying to achieve.

See other notes below:

Rgds,

Owen Boyle

>-----Original Message-----
>From: Pierre [mailto:pierre@gxist.com]
>Sent: Freitag, 19. Juli 2002 17:53
>To: users@httpd.apache.org
>Subject: RE: Install 2 apache in one server
>
>
>hi, 
>thanks Boyle for your response but that's don't work for yhe 2nd domain
>execpt www.thedomain.com:3000 
>
>My 1st httpd.conf is :
>
>ServerType standalone
>ServerRoot "/usr/local/apache"
>#Listen 3000
>#Listen 12.34.56.78:80
>#BindAddress *
>ExtendedStatus On
>#Port 80
>User nobody
>Group nobody

>>>DocumentRoot "/usr/local/apache/htdocs"
>>>ServerName myserv

You don't need "ServerName" or "DocumentRoot" here because you are using virtualhosts. It
is good practice to put all VH directives inside a VH.

>UseCanonicalName On
>HostnameLookups  on
>
>NameVirtualHost 213.186.37.72:80
>
>Listen 80
><VirtualHost ip:80>
>ServerAdmin tech@ovh.net
>DocumentRoot /home/rep/www
>User user
>Group group
>ServerName myserv
>UserDir disabled
></VirtualHost>
>
>and the 2nd is :
>
>ServerType standalone
>ServerRoot "/home/rep/www"

It is a bit odd to have the ServerRoot the same as the DocumentRoot. The SR is where the conf,
logs and bin directories are found, the DR is where the files are served from. If DR=SR, then
http://your-server/logs/access_log puts your log file on the server and http://your-server/conf/httpd.conf
put up your config file.. Is this what you want?

>#Listen 3000
>#Listen 213.186.37.72:3000
>#BindAddress *
>#ExtendedStatus On
>#Port 80
>User user2
>Group group2
>ServerName myserv2
>UseCanonicalName On
>HostnameLookups Off
>
>NameVirtualHost ip:3000
>
>Listen 3000
><VirtualHost ip:3000>
>DocumentRoot /home/rep2/www
>ServerName domain2.com
>ServerAlias www.domain2.com
>UserDir disabled
></VirtualHost>
>
>Is there a misteak ? ;)
>
>Thanks, 
>
>Pierre 
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message