What's the advantage of using a bunch of conf files, one for each virtual host, over just putting blocks for them in httpd-vhosts.conf with corresponding entries in /etc/hosts ?
Or does using the separate conf files mean I don't have to list each virtual host again in /etc/hosts ? (The "good news" about apache server is allowing so many ways to do things; the "bad news" is the same thing!) On Feb 28, 2013, at 9:47 AM, Mikel King <mikel.k...@olivent.com> wrote: > For your sanity's sake if you intend on host multiple ghosts you may > wish to go with something more along the lines of adding this line to the end > of your httpd.conf Include conf/sites/*.conf. Rmember to mkdir -p conf/sites > if it does not already exist. Then you would create a separate conf file for > each host. I usually opt for something along the lines of > host_domain_tld.conf to make it easy to distinguish which host is in which > file. Pretty much everything else you mentioned is standard dev practice. > > > On Feb 27, 2013, at 8:25 PM, Murray Eisenberg <murrayeisenb...@gmail.com> > wrote: > >> Do I correctly understand how to get virtual hosts to work with apache2 from >> macports? >> >> (1) In httpd.conf, uncomment "#Include conf/extra/httpd-vhosts.conf". >> >> (2) Edit file /opt/local/apache2/conf/extra/httpd-vhosts.conf so as to set >> the name and DocumentRoot for each VirualHost (and create the corresponding >> folder target for each DocumentRoot). >> >> (3) Edit file /etc/hosts to include each virtual host. Specifically, if all >> the virtual hosts are going to be strictly for local use, add to /etc/hosts >> entries of the form: >> >> >> 127.0.0.1 virtual-hot-name >> >> I ask this because docs I've come across for configuring macport's apache2 >> port, e.g., >> >> >> http://muddledramblings.com/rumblings-from-the-secret-labs/lamp-server-from-scratch-with-macports/ >> >> don't mention setp (3). --- Murray Eisenberg murrayeisenb...@gmail.com 80 Fearing Street phone 413 549-1020 (H) Amherst, MA 01002-1912 _______________________________________________ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users