首先注释掉 DocumentRoot /var/www/html
然后添加如下代码至文件底部:
NameVirtualHost 192.168.0.3
<virtualhost 192.168.0.3>
ServerAdmin [email protected]
DocumentRoot /var/www/html/website2
ServerName www.website2.com
ErrorLog /var/www/html/website2/logs/error_log
TransferLog /var/www/html/website2/logs/access_log
</virtualhost>
时间: 2024-10-09 02:02:26