添加以下行:
<VirtualHost *:80> ServerAdmin admin@yourdomain.com DocumentRoot "/var/www/html/gibbon/" ServerName yourdomain.com ServerAlias <<Directory "/var/www/html/gibbon/"> Options FollowSymLinks AllowOverride All Order allow,deny allow from all </Directory> ErrorLog /var/log/apache2/gibbon-error_log CustomLog /var/log/apache2/gibbon-access_log common </VirtualHost>完成后保存并关闭文件,然后使用以下命令启用虚拟主机文件:
sudo a2ensite gibbon
最后,重新启动apache2服务,以便它读取新的virtualhost配置:
sudo systemctl restart apache2