I _did_ forget to include http-vhosts.conf. Thanks for reminding me of that.  
(Not sure I need host_alias.) 

Plus I changed permissions in the vhosts to... 

   Require all granted

…from the apache 2.2 settings:

    Order allow, deny
    Allow from all

Almost everything is working as expected. (There’s a remaining issue with 
phpmyadmin that I’ll address in a separate thread.)


> On 24 Oct2017, at 4:33 PM, Alejandro Imass <[email protected]> wrote:
> 
> On Tue, Oct 24, 2017 at 4:09 PM Murray Eisenberg <[email protected] 
> <mailto:[email protected]>> wrote:
> Just a couple of typos in my original message fixed below.
> 
> > On 24 Oct2017, at 4:07 PM, Murray Eisenberg <[email protected] 
> > <mailto:[email protected]>> wrote:
> >
> > In apache 2.4 I have several virtual hosts configured  — properly, I 
> > believe — in /opt/local/etc/apache2/extra/httpd-vhosts.conf.
> >
> > One of the virtual hosts works just fine, but others do not.
> >
> > ** This one works **
> >
> > For example, once apache is running, in the browser I CAN load 
> > “myhomepage.local” thanks to this part of httpd-vhosts.conf:
> >
> >   <VirtualHost *:80>
> >       ServerAdmin [email protected] <mailto:[email protected]>
> >       DocumentRoot "/Users/me/Sites/MyHomePage"
> 
> The docs on the apache virtual hosts are pretty clear and FreeBSD’s file 
> layout is very standard. So some of your questions may be answered just by 
> RTFM, but here are some pointers that may help:
> 
> 1) make sure httpd-vhosts.conf is actually being included. They are usually 
> commented in httpd.conf so search that file for the commented Include 
> directive (search file for “vhost”)
> 2) If using aliases I think you need to also uncomment vhost_alias module in 
> that same file.
> 3) When Apache cannot make a match it will default to the first vhost defined 
> (this is explicit in the apache docs). So a good practice is to reserve the 
> first defined vhost precisely for non-matching sites. AFAICR once you use 
> vhost you cannot mix-match conf with global settings.
> 4) If this server is sitting behind a reverse proxy make sure you are passing 
> all the appropriate headers so the inner server can determine the original 
> request’s domain. Look at ProxyPreserveHost and/or rewrite your headers 
> manually YMMV.
> 
> Hope some of it helps.
> — 
> Alex

---
Murray Eisenberg                        [email protected]
503 King Farm Blvd #101 Home (240)-246-7240
Rockville, MD 20850-6667        Mobile (413)-427-5334


Reply via email to