The problem is that I have only one domain name on which three different products need to be run (two of them PHP based and one python). So I need to treat the path in the URL as a different virtual host; i.e.:
www.domain.com/first_URL/
www.domain.com/second_URL/
www.domain.com/third_URL/
Where the first to third will act as separate virtual hosts.
How can I do this?
You probably want to do something with the apache-config directives, since you’re asking for a virtualhost solution. Apache can only work with virtualHosts as actual domains, as cweiske explained.
The solution in this case would be to either use a
.htaccessfile in the sub-directories you’re working in, or to set up a<Directory "/web/root/subdir">..</Directory>block within your current (virtual-)host configuration.You could also choose to host them on different sub-domains if you per se want to run them as VirtualHosts (‘app1.domain.org’).