Score:0

How to permanentely change Apache Timeout by using include files?

cn flag

If I edit Timeout in /etc/apache2/conf/httpd.conf then it works for awhile but eventually gets overwritten.

Now, I know it says to use the include files like pre_main_global.conf. So, do I just put Timeout 1000 in pre_main_global.conf and rebuild and restart?

Edit:

Linux version: CentOS 7.9.2009

Apache version: 2.4.57 (cpanel)

Edit 2:

I see that httpd.conf includes additional conf files before and after Timeout is set. If I want to set Timeout in one of those additional conf files, does it matter if I put it in a conf file that is included before or after Timeout being defined?

ws flag
Different distributions of Apache httpd come with different file layouts. Different versions of Linux (I'm guessing this is Linux since say the config is in /etc) handle deploying patches to config files differently. You didn't tell us what distribution / versions you are using.
Ryan avatar
cn flag
I added the Linux and Apache versions to the post. I am just trying to find a simple way to permanently change the Apache Timeout. If I put it in .htaccess it causes an error. If I change it in httpd.conf it gets overwritten.
Score:0
ws flag

On Centos/RHEL the configuration is in /etc/httpd/conf and /etc/httpd/conf.d

The former contains files maintained by RHEL/Centos while your stuff goes in the latter. When httpd starts, it reads /etc/httpd/conf/httpd.conf. The last line in that file should be...

IncludeOptional conf.d/*.conf

i.e. your configuration files are read after the RHEL ones. The files in conf.d are loaded in alphabetical order - it is common practice to prefix the filename with a number to ensure predictable ordering.

I therefore suggest you add a new file in /etc/httpd/conf.d, called (for example) 99-ryanslimits.conf containing your configuration.

(Where the same configuration directives are repeated in the same scope, the later one overrides the earlier).

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.