echemi logo
Product
  • Product
  • Supplier
  • Inquiry
    Home > How to configure httpd.conf of Apache server?

    How to configure httpd.conf of Apache server?

    • Last Update: 2020-04-03
    • Source: Internet
    • Author: User
    Search more information of high quality chemicals, good prices and reliable suppliers, visit www.echemi.com
    Apache's HTTP server configuration file is / etc / httpd / conf / httpd.conf The document has good suggestions and most of them are easy to understand The default configuration applies in most cases However, it's good to be familiar with some important configuration choices Here are some instructions I just learned recently If you want to configure the Apache HTTP server, edit the / etc / httpd / conf / httpd.conf file, and then use reload, restart, or stop and start commands for the changes to take effect Before you edit httpd.conf, you should back up the original file This can quickly recover in the event of a problem If there is an error, the server is difficult to run normally First, check the httpd.conf changes you just made The next thing to do is to look at the web server error log, / var / log / httpd / error_log Although the error log is not easy to understand, it can provide many useful information, so it is worth taking some time to learn and master 1 The serverroot serverroot directive defines the top-level directory that contains the content of the web site The default settings are secure and non secure servers 2 Pidfile pidfile the file that the naming server records the process ID (PID) The default location of PID is / var / run / httpd.pid 3、 Timeout Timeout, defined in seconds, is the time the server waits for access and transmission during a session The default time is 300 seconds for most times 4 Keepalive keepalive sets whether the server allows more than one request per connection, which can be used to prevent a user from consuming too many server resources The default value for keepalive is off If keepalive is set to on and the server becomes busy, the server will generate a large number of subprocesses quickly In this case, the server slows down significantly If you have keepalive turned on, it is best to set keepalivetimeout to a lower number 5 MaxKeepAliveRequests this instruction sets the maximum number of requests per persistent connection It is recommended to set this value high to improve server performance The default value of MaxKeepAliveRequests is 100, which is applicable in most cases 6 The keepalivetimeout value sets the number of seconds to wait after the service is requested and before the connection is closed After the server accepts the request, it is replaced by the timeout instruction The default setting for keepalivetimeout is 15 This is part of the instruction related to httpd.conf configuration If you want your server to run more smoothly, it is important to fully understand these instructions.
    This article is an English version of an article which is originally in the Chinese language on echemi.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or complaint, to service@echemi.com. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.

    Contact Us

    The source of this page with content of products and services is from Internet, which doesn't represent ECHEMI's opinion. If you have any queries, please write to service@echemi.com. It will be replied within 5 days.

    Moreover, if you find any instances of plagiarism from the page, please send email to service@echemi.com with relevant evidence.