CentOS7.4 install Apache service

Environmental preparation

The steps begin:

1.  server端安装httpd服务
2.  修改配置文件
3.  启动服务
4.  查看服务状态
5.  验证服务

Environmental preparation:

The firewall is turned off, and the SElinux domain is turned off.
Server: 10.135.240.20
Client: 10.135.240.XX (multiple
servers can be installed) Apache service is installed on the cloud host 8 server, and the virtual host site www.netdj.com is established.

Claim:

(1) The home directory of its website is /netdj/www1, and the homepage in D:\Soft\Apache is stored in this home directory;
(2) The path and name of the configuration access log is /var/log/httpd/www1.netdj. com-access_log, the log record format is composite

1. Install httpd service on server

CentOS7.4 install Apache service

2. Modify the configuration file

CentOS7.4 install Apache service

  • Increase from line 113 to line 120
    CentOS7.4 install Apache service
  • Modify line 224: access log path
    CentOS7.4 install Apache service

    3. Start the httpd service and join the boot auto-start

    CentOS7.4 install Apache service

Guess you like

Origin blog.51cto.com/4183862/2562356