Sin ser un especialista en Apache o PHP, decidi investigar en como correr diferentes "apps" en diferentes puertos, digo, para tener app1 en el puerto 8080, app2 en el puerto 8082, como normalmente lo haria en Node sin ningún problema.
Investigando me encontré con VirtualHosts y las configuraciones de sites-enabled, así que aqui va una rápida configuración:
/etc/apache2/ports.conf
Para escuchar en el puerto 3010
, solo agregar:
NameVirtualHost *:3010
Listen 3010
Luego en /etc/apache2/sites-enabled/000-default
en mi caso agregar:
<VirtualHost *:3010>
ServerAdmin webmaster@localhost
DocumentRoot /home/alejandro/Documents/code/php
<Directory />
Options Indexes +FollowSymLinks
AllowOverride None
allow from all
</Directory>
<Directory /home/alejandro/Documents/code/php/www/>
Options Indexes +FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
<Directory /home/alejandro/Documents/code/php/www/*>
Options Indexes +FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Donde /home/alejandro/Documents/code/php
es el directorio de la app que quiero cargar con apache.
Y listo :)