Apache + Perl + PHP3 + MySQL Windows 9x


MySQL - 4


         Using the ServerPath

directive

IP-based vhosts only

         Setup 1: The server machine has two IP addresses (111.22.33.44

and 111.22.33.55) which resolve to the names server.domain.tld

and www.otherdomain.tld

respectively. The hostname www.domain.tld

is an alias (CNAME) for server.domain.tld

and will represent the main server.

Server configuration:

...

Port 80

DocumentRoot /www/domain

ServerName www.domain.tld

 

<VirtualHost 111.22.33.55>

DocumentRoot /www/otherdomain

ServerName www.otherdomain.tld

...

</VirtualHost>

www.otherdomain.tld can only be reached through the address 111.22.33.55, while www.domain.tld can only be reached through 111.22.33.44

(which represents our main server).

         Setup 2: Same as setup 1, but we don't want to have a dedicated main server.

Server configuration:

...

Port 80

ServerName server.domain.tld

<VirtualHost 111.22.33.44>

DocumentRoot /www/domain

ServerName www.domain.tld

...

</VirtualHost>

 

<VirtualHost 111.22.33.55>

DocumentRoot /www/otherdomain

ServerName www.otherdomain.tld

...

</VirtualHost>

The main server can never catch a request, because all IP addresses of our machine are in use for IP-based virtual hosts (only localhost requests can hit the main server).

         Setup 3: The server machine has two IP addresses (111.22.33.44

and 111.22.33.55) which resolve to the names server.domain.tld

and www-cache.domain.tld

respectively. The hostname www.domain.tld

is an alias (CNAME) for server.domain.tld

and will represent the main server. www-cache.domain.tld

will become our proxy-cache listening on port 8080, while the web server itself uses the default port 80.

Server configuration:




- -  - -  - -