I'm intrigued but maybe it was said but I missed it.

You say you can´t do: "aaa.bbb.ccc.ddd/app1, aaa.bbb.ccc.ddd/app2¨

Well, you can, but in the same virtualhost, and you can even point to
multiple fpm pools for each

Did you try something like this? :

<Virtualhost *:port>
Servername ip # no paths here just the ip
Documentroot /path/to/docroot

<Directory /path/to/docroot/app1>
<FilesMatch ^/\.php>
  SetHandler  "proxy:unix:/path/to/app1.sock|fcgi://localhost/"
  # or SetHandler  "proxy:fcgi://localhost:9000"
</FilesMatch>


<Directory /path/to/docroot/app2>
<FilesMatch ^/\.php>
  SetHandler  "proxy:unix:/path/to/app2.sock|fcgi://localhost/"
  # or SetHandler  "proxy:fcgi://localhost:9001"
</FilesMatch>

...
</VirtualHost>

Or you really need two separate virtualhosts to ease the choice for
the user just define different ports for each virtualhost and the
corresponding Listen directives.

El dom, 18 abr 2021 a las 2:14, H (<age...@meddatainc.com>) escribió:
>
> On 04/17/2021 06:09 PM, Eric Covener wrote:
> >> Yes, I (believe) I understand and find many examples how to configure 
> >> virtual name hosts when you have a domain name. BUT, I have yet to find 
> >> any examples where this works with /one/ single IP address rather than a 
> >> domain name.
> > This is because it's not applicable. The feature you're trying to use
> > allows the server to respond two different ways to two different
> > hostnames.
> > Without two or more hostnames it is meaningless.
> >
> >> The former pertains to defining various virtual hosts such as 
> >> site1.thisismydomain.com, site2.thisismydomain.com where the domain name 
> >> is the same.
> >>
> >> However, my current setup does not have a domain name associated with it, 
> >> only an IP address. Thus the virtual hosts I am trying to work would be 
> >> site1.aaa.bbb.ccc.ddd and site2.aaa.bbb.ccc.ddd where the IP address is 
> >> the same.
> > The configurations for these virtual hosts would only be used if the
> > client requests http://site1.aaa.bbb.ccc.ddd/* which will never
> > happen.
> >
> >> Note that the sites are on an external server and accessed remotely, not 
> >> on a local computer, and need to be accessed by multiple computers.
> >>
> >> Is this perhaps not possible??
> > Try the obscure ServerPath directive if you can't arrange for 2
> > hostnames to resolve to your IP address.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> > For additional commands, e-mail: users-h...@httpd.apache.org
> >
> Here is my current understanding after bloodying my forehead:
>
> My ultimate goal is to be able to run different php apps each potentially 
> requiring its unique php version using php-fpm. I would also like so separate 
> access and error logs by app, ie app1-access.log, app2-access.log etc.
>
> My original expectation was to call them through the same IP address followed 
> by the directory of the app, ie aaa.bbb.ccc.ddd/app1, aaa.bbb.ccc.ddd/app2 
> etc. This does not work.
>
> My understanding is now that:
>
> - To use unique php versions would require separating the apps into 
> individual VirtualHosts directives. Each VirtualHost directive can then call 
> its unique php-fpm handler.
>
> - I now understand this cannot be done using just an IP address in the 
> VirtualHost directive followed by app1, app2 etc. A domain name must be used.
>
> - There are workarounds which however do /not/ allow for different 
> VirtualHost directives which my objective would requires, such as using 
> ProxyPass, ProxyPass and Alias. Thus not a useable workaround.
>
> Therefore, it seems I need to pivot and use a common domain name instead of 
> IP address:
>
> - Create multiple VirtualHost directives where the ServerName would be 
> app1.domain.com, app2.domain.com. These can then be mapped to different 
> directory trees.
>
> - This should allow for using a different php-fpm handler in each VirtualHost 
> directive.
>
> Hopefully I made myself understandable but is my understanding correct?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>


-- 
Daniel Ferradal
HTTPD Project
#httpd help at Freenode

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

Reply via email to