1 创建站点文件
/etc/apache2/sites-available/xxxx.com.conf
2 内容如下:
<VirtualHost *:80>
ServerAdmin webmaster@rekihvac.reihekai.com
ServerName xxxx.com
ServerAlias www.xxxx.com
DocumentRoot /var/www/html/xxxx.com/public_html/
ErrorLog /var/www/html/xxxx.com/logs/error.log
CustomLog /var/www/html/xxxx.com/logs/access.log combined
</VirtualHost>
3 创建目录
sudo mkdir -p /var/www/html/xxxx.com/public_html
sudo mkdir /var/www/html/xxxx.com/logs
4 激活站点
sudo a2ensite xxxx.com