Web lists-archives.com

Re: How does Apache know what to run?




In article <oZGdnYaGOp7RAiDEnZ2dnUU7-U2dnZ2d@xxxxxxxxxxx>, 
ToddMargoChester@invalid.invalid says...
> How does it know which one to look for?
> 

How does Apache know what to serve when one asks for www.xxx.com/home? 
If the Apache server is serving a single site, the site administrator 
sets up a "home" directory (in Apache called a "document root") for that 
site and then all the paths under www.xxx.com are relative to that 
"home" directory. That's the simple answer.

If the server is serving multiple websites from the same host, Apache 
can be configured to run multiple virtual hosts, each one with its 
"home" directory ("document root"), and Apache has two ways to 
distinguishing which virtual host a request should go to:

1. By host name in the request. Multiple "sites" can thus be served at 
the same IP address. That way, www.xxx.com and www.yyy.com and 
www.zzz.com can all have the same IP address, address, will get routed 
to the same server, but that server will have different directories and 
serve different content based on the host name being referenced.

2. By IP address. But this means the server will need multiple IP 
addresses.

I'm looking at this as a bit of a refresher from when I rubbed shoulders 
with the networking team where I last worked:
https://httpd.apache.org/docs/2.4/vhosts/

_______________________________________________
general mailing list
general@xxxxxxxxxxxxxxxxx
https://lists.mozilla.org/listinfo/general