Apache setenvif.conf configuration example for Debian GNU/Linux 9 (stretch)

Get the default configuration file setenvif.conf for Apache, optimized for Debian GNU/Linux 9 (stretch). This example configuration ensures optimal compatibility and performance for Apache, making it easy to set up and adjust to meet your needs.

Find and download the configuration file here: /etc/apache2/mods-enabled/setenvif.conf.

For more configurations and setup guides, visit our related files section to further customize your system.

    <IfModule mod_setenvif.c>

	#
	# The following directives modify normal HTTP response behavior to
	# handle known problems with browser implementations.
	#
	BrowserMatch "Mozilla/2" nokeepalive
	BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
	BrowserMatch "RealPlayer 4\.0" force-response-1.0
	BrowserMatch "Java/1\.0" force-response-1.0
	BrowserMatch "JDK/1\.0" force-response-1.0

	#
	# The following directive disables redirects on non-GET requests for
	# a directory that does not include the trailing slash.  This fixes a
	# problem with Microsoft WebFolders which does not appropriately handle
	# redirects for folders with DAV methods.
	# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
	#
	BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
	BrowserMatch "MS FrontPage" redirect-carefully
	BrowserMatch "^WebDrive" redirect-carefully
	BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
	BrowserMatch "^gnome-vfs/1.0" redirect-carefully
	BrowserMatch "^gvfs/1" redirect-carefully
	BrowserMatch "^XML Spy" redirect-carefully
	BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
	BrowserMatch " Konqueror/4" redirect-carefully

</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

    
  

Config Details

Location
/etc/apache2/mods-enabled/setenvif.conf
Operating system
Debian GNU/Linux 9 (stretch)
Length
32 lines
MD5 checksum
533f5f92761c2c24d6820f1d7d1c45ad

Usage

Download the raw file with wget or curl

Wget

wget -O setenvif.conf.example https://exampleconfig.com/static/raw/apache/debian9/etc/apache2/mods-enabled/setenvif.conf

cURL

curl https://exampleconfig.com/static/raw/apache/debian9/etc/apache2/mods-enabled/setenvif.conf > setenvif.conf.example