Is it possible to set the TimeOut
directive for different locations in an Apache virtual host?
<Location "/fast">
TimeOut 5
</Location>
<Location "/slow">
TimeOut 180
</Location>
No. The documentation you linked to has this:
TimeOut Directive
Context: server config, virtual host
And the Context is explained like this:
This indicates where in the server's configuration files the directive is legal. It's a comma-separated list of one or more of the following values:
server config
This means that the directive may be used in the server configuration files (e.g., httpd.conf), but not within any
<VirtualHost>
or<Directory>
containers. It is not allowed in .htaccess files at all.virtual host
This context means that the directive may appear inside containers in the server configuration files.
directory
A directive marked as being valid in this context may be used inside
<Directory>
,<Location>
,<Files>
,<If>
, and<Proxy>
containers in the server configuration files, subject to the restrictions outlined in Configuration Sections..htaccess
If a directive is valid in this context, it means that it can appear inside per-directory .htaccess files. It may not be processed, though depending upon the overrides currently active.
The directive is only allowed within the designated context; if you try to use it elsewhere, you'll get a configuration error that will either prevent the server from handling requests in that context correctly, or will keep the server from operating at all -- i.e., the server won't even start.
Having TimeOut in the wrong context causes the configtest action to fail and Apache won't start.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With