Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LoadModule php5_module "D:/Server/php/php5apache2_4.dll"
- AddHandler application/x-httpd-php .php
- PHPIniDir "D:/Server/php/"
- ServerSignature Off
- ServerTokens Prod
- ListenBacklog 500
- AcceptFilter http none
- AcceptFilter https none
- EnableSendfile off
- EnableMMAP off
- ThreadLimit 300
- ThreadsPerChild 300
- MaxRequestsPerChild 0
- HostnameLookups off
- Options -Indexes
- ####Options -Includes
- Options -ExecCGI
- #Options -FollowSymLinks
- Options +FollowSymLinks -SymLinksIfOwnerMatch
- Timeout 30
- KeepAlive On
- KeepAliveTimeout 60
- SetOutputFilter DEFLATE
- <Directory />
- Order Deny,Allow
- Deny from all
- Options None
- AllowOverride None
- </Directory>
- <Directory D:/Server/apache/htdocs>
- Order Allow,Deny
- Allow from all
- AllowOverride all
- </Directory>
- <IfModule mod_deflate.c>
- # Force deflate for mangled headers:
- # http://developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
- <IfModule mod_setenvif.c>
- <IfModule mod_headers.c>
- SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
- RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
- </IfModule>
- </IfModule>
- <IfModule mod_filter.c>
- AddOutputFilterByType DEFLATE text/html text/plain text/css \
- application/json text/javascript application/javascript application/x-javascript text/x-js text/ecmascript application/ecmascript text/vbscript text/fluffscript \
- text/xml application/xml text/x-component \
- application/xhtml+xml application/rss+xml application/atom+xml \
- image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
- </IfModule>
- </IfModule>
- <IfModule mod_headers.c>
- <FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css)$">
- Header set Access-Control-Allow-Origin "*"
- </FilesMatch>
- </IfModule>
- # No caching for dynamic files
- <filesMatch "\.(php|cgi|pl|htm|html)$">
- ExpiresDefault A0
- Header set Cache-Control "no-store, no-cache, must-revalidate, max-age=0"
- Header set Pragma "no-cache"
- </filesMatch>
- # 2 DAYS
- <filesMatch "\.(xml|txt)$">
- ExpiresDefault A172800
- Header set Cache-Control "max-age=172800, must-revalidate"
- </filesMatch>
- # 1 WEEK
- <filesMatch "\.(jpg|jpeg|png|gif|swf|js|css)$">
- ExpiresDefault A604800
- Header set Cache-Control "max-age=604800, must-revalidate"
- </filesMatch>
- # 1 MONTH
- <filesMatch "\.(ico|pdf|flv|woff)$">
- ExpiresDefault A2419200
- Header set Cache-Control "max-age=2419200, must-revalidate"
- </filesMatch>
- <IfModule mod_mime.c>
- AddType application/x-compress .Z
- AddType application/x-gzip .gz .tgz
- AddType text/css .css
- AddType application/x-javascript .js
- AddType text/x-component .htc
- AddType text/html .html .htm
- AddType text/richtext .rtf .rtx
- AddType image/svg+xml .svg .svgz
- AddType text/plain .txt
- AddType text/xsd .xsd
- AddType text/xsl .xsl
- AddType text/xml .xml
- AddType video/asf .asf .asx .wax .wmv .wmx
- AddType video/avi .avi
- AddType image/bmp .bmp
- AddType application/java .class
- AddType video/divx .divx
- AddType application/msword .doc .docx
- AddType application/vnd.ms-fontobject .eot
- AddType application/x-msdownload .exe
- AddType image/gif .gif
- AddType application/x-gzip .gz .gzip
- AddType image/x-icon .ico
- AddType image/jpeg .jpg .jpeg .jpe
- AddType application/vnd.ms-access .mdb
- AddType audio/midi .mid .midi
- AddType video/quicktime .mov .qt
- AddType audio/mpeg .mp3 .m4a
- AddType video/mp4 .mp4 .m4v
- AddType video/mpeg .mpeg .mpg .mpe
- AddType application/vnd.ms-project .mpp
- AddType application/x-font-otf .otf
- AddType application/vnd.oasis.opendocument.database .odb
- AddType application/vnd.oasis.opendocument.chart .odc
- AddType application/vnd.oasis.opendocument.formula .odf
- AddType application/vnd.oasis.opendocument.graphics .odg
- AddType application/vnd.oasis.opendocument.presentation .odp
- AddType application/vnd.oasis.opendocument.spreadsheet .ods
- AddType application/vnd.oasis.opendocument.text .odt
- AddType audio/ogg .ogg
- AddType application/pdf .pdf
- AddType image/png .png
- AddType application/vnd.ms-powerpoint .pot .pps .ppt .pptx
- AddType audio/x-realaudio .ra .ram
- AddType application/x-shockwave-flash .swf
- AddType application/x-tar .tar
- AddType image/tiff .tif .tiff
- AddType application/x-font-ttf .ttf .ttc
- AddType audio/wav .wav
- AddType audio/wma .wma
- AddType application/vnd.ms-write .wri
- AddType application/vnd.ms-excel .xla .xls .xlsx .xlt .xlw
- AddType application/zip .zip
- </IfModule>
- # ----------------------------------------------------------------------
- # Block access to backup and source files (Security)
- # This files may be left by some text/html editors and pose a great security danger
- #
- <FilesMatch "(\.(bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$">
- Order allow,deny
- Deny from all
- Satisfy All
- </FilesMatch>
- # ----------------------------------------------------------------------
- # Increase cookie security (Security)
- # This files may be left by some text/html editors and pose a great security danger
- # ----------------------------------------------------------------------
- <IfModule php5_module>
- php_value session.cookie_httponly true
- </IfModule>
- # ----------------------------------------------------------------------
- # Force latest IE rendering engine
- # ----------------------------------------------------------------------
- <IfModule mod_headers.c>
- Header set X-UA-Compatible "IE=Edge,chrome=1"
- # mod_headers can't match by content-type, but we don't want to this header on everything
- <FilesMatch "\.(js|css|gif|png|jpe?g|pdf|xml|oga|ogg|m4a|ogv|mp4|m4v|webm|svg|svgz|eot|ttf|otf|woff|ico|webp|appcache|manifest|htc|crx|oex|xpi|safariextz|vcf)$" >
- Header unset X-UA-Compatible
- </FilesMatch>
- </IfModule>
- # ----------------------------------------------------------------------
- # Instructs the proxies to cache two versions of the resource: one compressed, and one uncompressed.
- # https://developers.google.com/speed/docs/best-practices/caching#LeverageProxyCaching
- # ----------------------------------------------------------------------
- <IfModule mod_headers.c>
- <FilesMatch "\.(js|css|xml|gz)$">
- Header append Vary: Accept-Encoding
- </FilesMatch>
- </IfModule>
- # ----------------------------------------------------------------------
- # CORS-enabled images (@crossorigin)
- # Send CORS headers if browsers request them; enabled by default for images.
- # http://developer.mozilla.org/en/CORS_Enabled_Image
- # http://blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html
- # http://hacks.mozilla.org/2011/11/using-cors-to-load-webgl-textures-from-cross-domain-images/
- # http://wiki.mozilla.org/Security/Reviews/crossoriginAttribute
- # ----------------------------------------------------------------------
- <IfModule mod_setenvif.c>
- <IfModule mod_headers.c>
- <FilesMatch "\.(gif|png|jpeg|svg|svgz|ico|webp)$">
- SetEnvIf Origin ":" IS_CORS
- Header set Access-Control-Allow-Origin "*" env=IS_CORS
- </FilesMatch>
- </IfModule>
- </IfModule>
- # This is the main Apache HTTP server configuration file. It contains the
- # configuration directives that give the server its instructions.
- # See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
- # In particular, see
- # <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
- # for a discussion of each configuration directive.
- #
- # Do NOT simply read the instructions in here without understanding
- # what they do. They're here only as hints or reminders. If you are unsure
- # consult the online docs. You have been warned.
- #
- # Configuration and logfile names: If the filenames you specify for many
- # of the server's control files begin with "/" (or "drive:/" for Win32), the
- # server will use that explicit path. If the filenames do *not* begin
- # with "/", the value of ServerRoot is prepended -- so "logs/access_log"
- # with ServerRoot set to "/usr/local/apache2" will be interpreted by the
- # server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log"
- # will be interpreted as '/logs/access_log'.
- #
- # NOTE: Where filenames are specified, you must use forward slashes
- # instead of backslashes (e.g., "c:/apache" instead of "c:\apache").
- # If a drive letter is omitted, the drive on which httpd.exe is located
- # will be used by default. It is recommended that you always supply
- # an explicit drive letter in absolute paths to avoid confusion.
- #
- # ServerRoot: The top of the directory tree under which the server's
- # configuration, error, and log files are kept.
- #
- # Do not add a slash at the end of the directory path. If you point
- # ServerRoot at a non-local disk, be sure to specify a local disk on the
- # Mutex directive, if file-based mutexes are used. If you wish to share the
- # same ServerRoot for multiple httpd daemons, you will need to change at
- # least PidFile.
- #
- ServerRoot "D:/Server/apache/"
- #
- # Mutex: Allows you to set the mutex mechanism and mutex file directory
- # for individual mutexes, or change the global defaults
- #
- # Uncomment and change the directory if mutexes are file-based and the default
- # mutex file directory is not on a local disk or is not appropriate for some
- # other reason.
- #
- # Mutex default:logs
- #
- # Listen: Allows you to bind Apache to specific IP addresses and/or
- # ports, instead of the default. See also the <VirtualHost>
- # directive.
- #
- # Change this to Listen on specific IP addresses as shown below to
- # prevent Apache from glomming onto all bound IP addresses.
- #
- #Listen 12.34.56.78:80
- Listen 80
- #Listen 443
- #
- # Dynamic Shared Object (DSO) Support
- #
- # To be able to use the functionality of a module which was built as a DSO you
- # have to place corresponding `LoadModule' lines at this location so the
- # directives contained in it are actually available _before_ they are used.
- # Statically compiled modules (those listed by `httpd -l') do not need
- # to be loaded here.
- #
- # Example:
- # LoadModule foo_module modules/mod_foo.so
- LoadModule access_compat_module modules/mod_access_compat.so
- #LoadModule mpm_winnt_module
- LoadModule authz_core_module modules/mod_authz_core.so
- LoadModule deflate_module modules/mod_deflate.so
- LoadModule dir_module modules/mod_dir.so
- LoadModule expires_module modules/mod_expires.so
- LoadModule ext_filter_module modules/mod_ext_filter.so
- LoadModule file_cache_module modules/mod_file_cache.so
- LoadModule filter_module modules/mod_filter.so
- LoadModule headers_module modules/mod_headers.so
- LoadModule log_config_module modules/mod_log_config.so
- LoadModule mime_module modules/mod_mime.so
- LoadModule rewrite_module modules/mod_rewrite.so
- LoadModule setenvif_module modules/mod_setenvif.so
- LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
- LoadModule ssl_module modules/mod_ssl.so
- ServerAdmin strtofloat@yandex.ru
- ServerName mos-voda.com
- DocumentRoot "D:/Server/apache/htdocs"
- <Directory "D:/Server/apache/htdocs">
- Options Indexes
- Options +FollowSymLinks -SymLinksIfOwnerMatch
- Require all granted
- </Directory>
- #
- # DirectoryIndex: sets the file that Apache will serve if a directory
- # is requested.
- #
- <IfModule dir_module>
- DirectoryIndex index.php index.html
- </IfModule>
- #
- # The following lines prevent .htaccess and .htpasswd files from being
- # viewed by Web clients.
- #
- <Files ".ht*">
- Require all denied
- </Files>
- ErrorLog "logs/error.log"
- LogLevel warn
- #LogLevel debug
- <IfModule log_config_module>
- #
- # The following directives define some format nicknames for use with
- # a CustomLog directive (see below).
- #
- #LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
- LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" **%T/%D**" combined
- #LogFormat "%h %l %u %t \"%r\" %>s %b" common
- <IfModule logio_module>
- # You need to enable mod_logio.c to use %I and %O
- LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
- </IfModule>
- #
- # The location and format of the access logfile (Common Logfile Format).
- # If you do not define any access logfiles within a <VirtualHost>
- # container, they will be logged here. Contrariwise, if you *do*
- # define per-<VirtualHost> access logfiles, transactions will be
- # logged therein and *not* in this file.
- #
- CustomLog "logs/access.log" common
- #
- # If you prefer a logfile with access, agent, and referer information
- # (Combined Logfile Format) you can use the following directive.
- #
- #CustomLog "logs/access.log" combined
- </IfModule>
- <IfModule mime_module>
- #
- # TypesConfig points to the file containing the list of mappings from
- # filename extension to MIME-type.
- #
- TypesConfig conf/mime.types
- #
- # AddType allows you to add to or override the MIME configuration
- # file specified in TypesConfig for specific file types.
- #
- #AddType application/x-gzip .tgz
- #
- # AddEncoding allows you to have certain browsers uncompress
- # information on the fly. Note: Not all browsers support this.
- #
- #AddEncoding x-compress .Z
- #AddEncoding x-gzip .gz .tgz
- #
- # If the AddEncoding directives above are commented-out, then you
- # probably should define those extensions to indicate media types:
- #
- #AddType application/x-compress .Z
- #AddType application/x-gzip .gz .tgz
- #
- # AddHandler allows you to map certain file extensions to "handlers":
- # actions unrelated to filetype. These can be either built into the server
- # or added with the Action directive (see below)
- #
- # To use CGI scripts outside of ScriptAliased directories:
- # (You will also need to add "ExecCGI" to the "Options" directive.)
- #
- #AddHandler cgi-script .cgi
- # For type maps (negotiated resources):
- #AddHandler type-map var
- #
- # Filters allow you to process content before it is sent to the client.
- #
- # To parse .shtml files for server-side includes (SSI):
- # (You will also need to add "Includes" to the "Options" directive.)
- #
- #AddType text/html .shtml
- #AddOutputFilter INCLUDES .shtml
- </IfModule>
- #
- # The mod_mime_magic module allows the server to use various hints from the
- # contents of the file itself to determine its type. The MIMEMagicFile
- # directive tells the module where the hint definitions are located.
- #
- #MIMEMagicFile conf/magic
- #
- # Customizable error responses come in three flavors:
- # 1) plain text 2) local redirects 3) external redirects
- #
- # Some examples:
- #ErrorDocument 500 "The server made a boo boo."
- #ErrorDocument 404 /missing.html
- #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
- #ErrorDocument 402 http://www.example.com/subscription_info.html
- #
- #
- # MaxRanges: Maximum number of Ranges in a request before
- # returning the entire resource, or one of the special
- # values 'default', 'none' or 'unlimited'.
- # Default setting is to accept 200 Ranges.
- #MaxRanges unlimited
- #
- # EnableMMAP and EnableSendfile: On systems that support it,
- # memory-mapping or the sendfile syscall may be used to deliver
- # files. This usually improves server performance, but must
- # be turned off when serving from networked-mounted
- # filesystems or if support for these functions is otherwise
- # broken on your system.
- # Defaults: EnableMMAP On, EnableSendfile Off
- #
- #EnableMMAP off
- #EnableSendfile Off
- #выше врублено
- # Supplemental configuration
- #
- # The configuration files in the conf/extra/ directory can be
- # included to add extra features or to modify the default configuration of
- # the server, or you may simply copy their contents here and change as
- # necessary.
- # Server-pool management (MPM specific)
- #Include conf/extra/httpd-mpm.conf
- # Multi-language error messages
- #Include conf/extra/httpd-multilang-errordoc.conf
- # Fancy directory listings
- #Include conf/extra/httpd-autoindex.conf
- # Language settings
- #Include conf/extra/httpd-languages.conf
- # User home directories
- #Include conf/extra/httpd-userdir.conf
- # Real-time info on requests and configuration
- #Include conf/extra/httpd-info.conf
- # Virtual hosts
- #Include conf/extra/httpd-vhosts.conf
- # Local access to the Apache HTTP Server Manual
- #Include conf/extra/httpd-manual.conf
- # Distributed authoring and versioning (WebDAV)
- #Include conf/extra/httpd-dav.conf
- # Various default settings
- #Include conf/extra/httpd-default.conf
- ####################### Configure mod_proxy_html to understand HTML4/XHTML1
- #<IfModule proxy_html_module>
- #Include conf/extra/proxy-html.conf
- #</IfModule>
- # Secure (SSL/TLS) connections
- Include conf/extra/httpd-ssl.conf
- #
- # Note: The following must must be present to support
- # starting without SSL on platforms with no /dev/random equivalent
- # but a statically compiled-in mod_ssl.
- #
- <IfModule ssl_module>
- SSLRandomSeed startup builtin
- SSLRandomSeed connect builtin
- </IfModule>
- #
- # uncomment out the below to deal with user agents that deliberately
- # violate open standards by misusing DNT (DNT *must* be a specific
- # end-user choice)
- #
- #<IfModule setenvif_module>
- #BrowserMatch "MSIE 10.0;" bad_DNT
- #</IfModule>
- #<IfModule headers_module>
- #RequestHeader unset DNT env=bad_DNT
- #</IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement