Rate This Document
Findability
Accuracy
Completeness
Readability

Parameter Configuration

  1. Modify the httpd.conf file.
    1. Open the file.
      1
      vim /usr/local/apache2/conf/httpd.conf
      

      If you install Apache in RPM mode on CentOS 8.1, the file path is /etc/httpd/conf/httpd.conf.

    2. Modify the following content:
      1. Change the listen port number in line 52 to 80.
        Listen 0.0.0.0:80
      2. Delete the comment tag (#) from line 89.
      3. If you install Apache in RPM mode on CentOS 8.1, this code is in line 92.
        LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
      4. In line 198, change ServerName to the actual server IP address and port number.

        You can run the ip a or ifconfig command to query the server IP address.

      5. If you install Apache in RPM mode on CentOS 8.1, this code is in line 221.
        ServerName IP:80
      6. Delete the comment tag (#) from line 463.

        If you install Apache in RPM mode on CentOS 8.1, this code is in line 486.

        Include conf/extra/httpd-mpm.conf
      7. Delete the comment tag (#) from line 490.
      8. If you install Apache in RPM mode on CentOS 8.1, this code is in line 513.
        Include conf/extra/httpd-default.conf
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  2. Modify the httpd-default.conf file.
    1. Open the file.
      1
      vim /usr/local/apache2/conf/extra/httpd-default.conf
      

      If you install Apache in RPM mode on CentOS 8.1, the file path is /etc/httpd/conf/extra/httpd-default.conf.

    2. Modify the following content:

      Change the value of MaxKeepAliveRequests in line 23 to 0.

      MaxKeepAliveRequests 0
    3. Press Esc, type :wq!, and press Enter to save the file and exit.