VirtualHost
De enunpimpam
Revisión del 17:21 3 jul 2020 de Nacho (discusión | contribuciones)
<VirtualHost *:80>
ServerAdmin nacho@espaiformacio.com
DocumentRoot /var/www/pimpa/
ServerName tom.enunpimpam.com
ServerAlias www.tom.enunpimpam.com
Alias /pimpa "/var/www/pimpa/"
<Directory /var/www/pimpa/>
Options +FollowSymlinks
AllowOverride All
Require all granted
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/pimpa
SetEnv HTTP_HOME /var/www/pimpa
</Directory>
ErrorLog ${APACHE_LOG_DIR}/pimpa.error.log
CustomLog ${APACHE_LOG_DIR}/pimpa.access.log combined
</VirtualHost>
Obtener el listado de VirtualHosts de un Apache
Para obtener un listado de los dominios que esta activos sus puerto y los archivos de configuración.
apachectl -S
VirtualHost configuration:
*:80 is a NameVirtualHost
default server 192.168.101.20 (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost 192.168.101.20 (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost aki.nationarmy.net (/etc/apache2/sites-enabled/aki.nat.conf:1)
alias www.aki.nationarmy.net
port 80 namevhost nationarmy.net (/etc/apache2/sites-enabled/nationarmy.conf:1)
alias www.nationarmy.net
*:443 is a NameVirtualHost
default server aki.nationarmy.net (/etc/apache2/sites-enabled/aki-ssl.conf:2)
port 443 namevhost aki.nationarmy.net (/etc/apache2/sites-enabled/aki-ssl.conf:2)
alias www.aki.nationarmy.net
port 443 namevhost 192.168.101.20 (/etc/apache2/sites-enabled/default-ssl.conf:2)
port 443 namevhost nationarmy.net (/etc/apache2/sites-enabled/nation-ssl.conf:2)
alias www.nationarmy.net
port 443 namevhost toma.nationarmy.net (/etc/apache2/sites-enabled/toma.nation-ssl.conf:2)
alias www.toma.nationarmy.net
ServerRoot: "/etc/apache2"