I have multiple domains and i have imagined that one VirtualHost for each would be the way to go. glpi.localnet.lan is never loaded, whereas web.localnet.lan is always display instead, even if i tip "glpi.localnet.lan" in web browser.
glpi.localnet.lan.conf in sites-enabled:
<VirtualHost *:80>
ServerName glpi.localnet.lan
ServerAdmin [email protected]
ServerAlias glpi
Alias /glpi/ /var/www/glpi/
RedirectMatch ^/$ /glpi/
DocumentRoot /var/www/glpi
<Directory />
Options None
AllowOverride None
</Directory>
<Directory /var/www/glpi>
Options None
AllowOverride None
</Directory>
<Directory /var/www/glpi/files>
Options None
AllowOverride None
Order allow,deny
deny from all
</Directory>
LogLevel debug
CustomLog ${APACHE_LOG_DIR}/glpi-access.log combined
ErrorLog ${APACHE_LOG_DIR}/glpi-error.log
</VirtualHost>
Here is web.localnet.lan.conf also in sites-enabled:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName web.localnet.lan
ServerAlias web
DocumentRoot /var/www/html
<Directory />
Options None
AllowOverride None
</Directory>
<Directory /var/www/html>
Options None
AllowOverride None
</Directory>
LogLevel debug
CustomLog ${APACHE_LOG_DIR}/web-access.log combined
ErrorLog ${APACHE_LOG_DIR}/web-error.log
</VirtualHost>
How can i accomplish the following thing:
- When i enter glpi.localnet.lan, configuration file
glpi.localnet.lan.conf
is loaded,
- When i enter web.localnet.lan, configuration file
web.localnet.lan.conf
is loaded.
Alone, each configuration file works fine. Combining both leads to only one taken into account and requests found in log file of the configuration file taken into account (even if not the expecting one). (seems to depend which one i add first with a2ensite
command ?!).
Soooo many thanks for your help, please feel free to ask for more details i may i forgotten to provide.