debian 10 apache2 VirtualHost
最基本的VirtualHost配置 新增配置文件 nano /etc/apache2/sites-available/example.hkcto.com.conf <VirtualHost *:80> ServerAdmin webmaster@example.hkcto.com DocumentRoot "/var/www/example.hkcto.com" ServerName example.hkcto.com ErrorLog "${APACHE_LOG_DIR}/example.hkcto.com-error_log" TransferLog "${APACHE_LOG_DIR}/example.hkcto.com-access_log" </VirtualHost> 2. 使VirtualHost 配置文件生效 a2ensite example.hkcto.com.conf 3. apache 重新加載配置文件 systemctl reload apache2