Skip to main content

Création du virtualhost (hôte virtuel)

cd /etc/apache2/sites-available/
nano zabbix.littoral1.fr.conf
<VirtualHost *:80>
	ServerName zabbix.littoral1.fr
	ServerAlias www.zabbix.littoral1.fr
	ServerAdmin Administrateur@littoral1.fr
	DocumentRoot /usr/share/zabbix
	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

<VirtualHost *:443>
	ServerName zabbix.littoral1.fr
	ServerAlias www.zabbix.littoral1.fr
	ServerAdmin Administrateur@littoral1.fr
	DocumentRoot /usr/share/zabbix
	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined
	SSLCertificateFile "/etc/apache2/ssl/cert.pem"
	SSLCertificateKeyFile "/etc/apache2/ssl/cert.pem"
</VirtualHost>

On active le site.

a2ensite zabbix.littoral1.fr
systemctl reload apache2
systemctl restart apache2

image-1615657223133.png