Thanks, the first answer is here, it works: https://serverfault.com/questions/588841/two-apps-on-apache-server-with-uri
I will answer here if one day the link does not work:
What you can do is set up a reverse proxy server for different virtual hosts listening only on the loop.
www.localhost:
<VirtualHost *:80>
DocumentRoot /var/www/
ServerName localhost
ServerAlias www.localhost
ProxyPassReverse /app1/ http://webapp1.local/
ProxyPassReverse /app2/ http://webapp2.local/
</Virtualhost>
:
<VirtualHost 127.0.0.1:80>
DocumentRoot /var/www/app1
ServerName webapp1.local
<Directory /var/www/app1>
Allow from all
</Directory>
</Virtualhost>
<VirtualHost 127.0.0.1:80>
DocumentRoot /var/www/app2
ServerName webapp2.local
<Directory /var/www/app2>
Allow from all
</Directory>
</Virtualhost>
webapp1.local webapp2.local /etc/hosts.