httpd.conf 2.52 KB
# Apache httpd v2.4 minimal configuration
# This can be reduced further if you remove the accees log and mod_log_config
ServerRoot "/usr/local/apache2"

# Minimum modules needed
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule dir_module modules/mod_dir.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule unixd_module modules/mod_unixd.so
LoadModule mpm_event_module modules/mod_mpm_event.so

TypesConfig conf/mime.types

PidFile logs/httpd.pid

# Comment this out if running httpd as a non root user
User nobody

# Port to Listen on
Listen *:80

# In a basic setup httpd can only serve files from its document root
#DocumentRoot "/usr/local/apache2/htdocs"

# Default file to serve
DirectoryIndex index.html

# Errors go to their own log
ErrorLog /dev/stderr

# Access log
TransferLog /dev/stdout

# Never change this block
<Directory />
  AllowOverride None
  Require all denied
</Directory>

# Allow documents to be served from the DocumentRoot
<Directory "/usr/local/apache2/htdocs">
  Options MultiViews
  Require all granted
</Directory>

#Barra
LoadModule deflate_module modules/mod_deflate.so 
LoadModule expires_module modules/mod_expires.so
LoadModule filter_module modules/mod_filter.so
LoadModule headers_module modules/mod_headers.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule http2_module modules/mod_http2.so

#Issue https://bz.apache.org/bugzilla/show_bug.cgi?id=45023
RequestHeader edit "If-None-Match" "^\"(.*)-gzip\"$" "\"$1\""
Header edit "ETag" "^\"(.*[^g][^z][^i][^p])\"$" "\"$1-gzip\""

Header append Cache-Control public
Header set Access-Control-Allow-Origin "*"

AddDefaultCharset utf-8

AddType application/x-font-woff .woff

AddHandler type-map .var
AddLanguage pt-br .pt-br
AddLanguage en .en
AddLanguage es .es
AddLanguage fr .fr
DefaultLanguage pt-br
LanguagePriority pt-br en es fr
ForceLanguagePriority Prefer Fallback

CacheFile /usr/local/apache2/htdocs/barra.js.pt-br
CacheFile /usr/local/apache2/htdocs/barra.js.es
CacheFile /usr/local/apache2/htdocs/barra.js.en
CacheFile /usr/local/apache2/htdocs/barra.js.fr

ExpiresActive On 
ExpiresDefault "access plus 1 week"
ExpiresByType application/x-font-woff "access plus 1 year"

Protocols h2 h2c http/1.1

<IfModule mod_deflate.c> 
    AddOutputFilterByType DEFLATE text/html text/plain text/css 
    AddOutputFilterByType DEFLATE text/javascript application/javascript 
    AddOutputFilterByType DEFLATE application/x-font-woff
</IfModule>