CentOS Apache 部署静态网站

①httpd安装(Apache主程序)


②开启httpd服务

③设置开机自启

[root@i web]# yum install httpd
[root@i web]# systemctl start httpd
[root@i web]# systemctl enable httpd

④配置文件 etc/httpd/conf/httpd.conf,加入如下

Listen 8091

  DocumentRoot "/var/www/html/webProject"
  ServerName ip或域名
  ServerAlias
  
  

⑤重启httpd服务

[root@i web]# service httpd restart


你可能感兴趣的:(CentOS Apache 部署静态网站)