(个人经验,仅供参考,错误之处,敬请谅解)
安装
使用指令sudo apt-get install apache2
修改配置文件
这里找了很多回答,都是修改httpd.conf文件
<VirtualHost 你的ip:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/finderName (绑定的文件夹)
ServerName 你的域名
</VirtualHost>
自选设置Errorlog和Customlog配置
但实际需要修改的文件是在apache2文件夹中sites-enabled文件夹下的配置文件
000-default.conf
根据上面的内容进行设置即可绑定好域名和项目文件夹