114 lines
No EOL
3.5 KiB
Text
114 lines
No EOL
3.5 KiB
Text
#User noroot
|
|
#Group noroot
|
|
#
|
|
# Timeout: The number of seconds before receives and sends time out.
|
|
#
|
|
Timeout 300
|
|
|
|
#
|
|
# KeepAlive: Whether or not to allow persistent connections (more than
|
|
# one request per connection). Set to "Off" to deactivate.
|
|
#
|
|
KeepAlive On
|
|
|
|
#
|
|
# MaxKeepAliveRequests: The maximum number of requests to allow
|
|
# during a persistent connection. Set to 0 to allow an unlimited amount.
|
|
# We recommend you leave this number high, for maximum performance.
|
|
#
|
|
MaxKeepAliveRequests 100
|
|
|
|
#
|
|
# KeepAliveTimeout: Number of seconds to wait for the next request from the
|
|
# same client on the same connection.
|
|
#
|
|
KeepAliveTimeout 5
|
|
|
|
#
|
|
# AccessFileName: The name of the file to look for in each directory
|
|
# for additional configuration directives. See also the AllowOverride
|
|
# directive.
|
|
#
|
|
|
|
AccessFileName .htaccess
|
|
|
|
#
|
|
# The following lines prevent .htaccess and .htpasswd files from being
|
|
# viewed by Web clients.
|
|
#
|
|
<FilesMatch "^\.ht">
|
|
Require all denied
|
|
</FilesMatch>
|
|
|
|
# Block .git composer and npm files
|
|
|
|
<FilesMatch "^composer\.(json|lock)">
|
|
Require all denied
|
|
</FilesMatch>
|
|
<FilesMatch "^package(-lock)?\.json">
|
|
Require all denied
|
|
</FilesMatch>
|
|
<FilesMatch "^\.">
|
|
Require all denied
|
|
</FilesMatch>
|
|
<DirectoryMatch "^\.|\/\.">
|
|
Require all denied
|
|
</Directorymatch>
|
|
|
|
#
|
|
# DefaultType is the default MIME type the server will use for a document
|
|
# if it cannot otherwise determine one, such as from filename extensions.
|
|
# If your server contains mostly text or HTML documents, "text/plain" is
|
|
# a good value. If most of your content is binary, such as applications
|
|
# or images, you may want to use "application/octet-stream" instead to
|
|
# keep browsers from trying to display binary files as though they are
|
|
# text.
|
|
#
|
|
# It is also possible to omit any default MIME type and let the
|
|
# client's browser guess an appropriate action instead. Typically the
|
|
# browser will decide based on the file's extension then. In cases
|
|
# where no good assumption can be made, letting the default MIME type
|
|
# unset is suggested instead of forcing the browser to accept
|
|
# incorrect metadata.
|
|
#
|
|
DefaultType None
|
|
|
|
|
|
#
|
|
# HostnameLookups: Log the names of clients or just their IP addresses
|
|
# e.g., www.apache.org (on) or 204.62.129.132 (off).
|
|
# The default is off because it'd be overall better for the net if people
|
|
# had to knowingly turn this feature on, since enabling it means that
|
|
# each client request will result in AT LEAST one lookup request to the
|
|
# nameserver.
|
|
#
|
|
HostnameLookups Off
|
|
|
|
# ErrorLog: The location of the error log file.
|
|
# If you do not specify an ErrorLog directive within a <VirtualHost>
|
|
# container, error messages relating to that virtual host will be
|
|
# logged here. If you *do* define an error logfile for a <VirtualHost>
|
|
# container, that host's errors will be logged there and not here.
|
|
#
|
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
|
|
|
#
|
|
# LogLevel: Control the number of messages logged to the error_log.
|
|
# Possible values include: debug, info, notice, warn, error, crit,
|
|
# alert, emerg.
|
|
#
|
|
LogLevel warn
|
|
|
|
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
|
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b" common
|
|
LogFormat "%{Referer}i -> %U" referer
|
|
LogFormat "%{User-agent}i" agent
|
|
SetEnvIf Remote_Addr "127\.0\.0\.1" loopback
|
|
SetEnvIf Request_URI "^/haproxytest\.txt$" dontlog
|
|
SetEnvIf Request_URI "^check_http" dontlog
|
|
SetEnvIf Remote_Addr "127.0.0.1" dontlog
|
|
SetEnvIf Remote_Addr "::1" dontlog
|
|
|
|
# Include generic snippets of statements
|
|
SetEnvIf Remote_Addr "127\.0\.0\.1" loopback
|
|
SetEnvIf Request_URI "^/haproxytest\.txt$" dontlog |