Good, I have installed an ubuntu environment with local apache to use Apache as a reverse proxy of NGINX.
The idea is to serve the nginx requests on port 80 and run apache on port 8080, so far it works for me.
My structure where I have the files is in / var / www / html
Now what I'm trying to do is a virtualhost that when I put "localhost" it takes the root by default, that is, the directory "/ var / www / html" and a virtualhost that when I put "www.test.io" I go to the directory "/ var / www / html / portal", for that I have these configuration files:
File "test.io.conf" in / etc / apache2 / sites-available
<VirtualHost 127.0.0.1:8080>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/portal
ServerName test.io
ServerAlias www.test.io
<Directory /var/www/html/portal>
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
#Include conf-available/serve-cgi-bin.conf
File "000-default.conf" in / etc / apache2 / sites-available
<VirtualHost 127.0.0.1:8080>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
If with a browser I go to link I see that I go to the root where I have the documents "/ var / www / html /", but if in the browser I type the URL link or link what makes me the browser is to really go to that domain that exists on the internet and not the virtualhost that I created.
Thank you.