{"id":1955,"date":"2023-01-15T19:13:32","date_gmt":"2023-01-15T22:13:32","guid":{"rendered":"https:\/\/bfnetworks.com.br\/?p=1955"},"modified":"2023-01-15T19:20:31","modified_gmt":"2023-01-15T22:20:31","slug":"configurando-hstp","status":"publish","type":"post","link":"https:\/\/bfnetworks.com.br\/configurando-hstp\/","title":{"rendered":"Configurando HSTP (HTTP Strict Transport Security) – Apache\/Nginx"},"content":{"rendered":"\n

Por enquanto essa configurando ser\u00e1 apenas para o apache.<\/p>\n\n\n\n

Para saber mais sobre HSTP acesse<\/a>.<\/p>\n\n\n\n

Verifica\u00e7\u00e3o do m\u00f3dulo<\/h2>\n\n\n\n

Valide se o m\u00f3dulo heards est\u00e1 habilitado em seu servidor executando:<\/p>\n\n\n\n\n

# apache2ctl -M |grep head<\/code><\/pre>\n\n\n\n\n

Deveria mostrar algo como:<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Essa verifica\u00e7\u00e3o pode ser feita tamb\u00e9m observando se existe o arquivo \/etc\/apache2\/mods-enabled\/headers.load<\/strong>.<\/p>\n\n\n\n

Caso n\u00e3o tenha o m\u00f3dulo habilitado, habilite com o comando abaixo e reiniciei o servi\u00e7o:<\/p>\n\n\n\n\n

# a2enmod headers
# systemctl restart apache2<\/code><\/pre>\n\n\n\n\n

Configura\u00e7\u00e3o HSTS<\/h2>\n\n\n\n

Edite o arquivo do seu site, como por exemplo \/etc\/apache2\/sites-enabled\/default-ssl.conf<\/strong><\/p>\n\n\n\n

E adicionei a linha como abaixo:<\/p>\n\n\n\n

<VirtualHost *:443>\n...\nHeader always set Strict-Transport-Security \"max-age=63072000; includeSubDomains\"\n...\n<\/VirtualHost><\/code><\/pre>\n\n\n\n

FONTES<\/h2>\n\n\n\n

https:\/\/ubiq.co\/tech-blog\/enable-mod_headers-apache-ubuntu\/
https:\/\/www.tecmint.com\/check-apache-modules-enabled\/
https:\/\/www.rfc-editor.org\/rfc\/rfc6797#section-2<\/p>\n","protected":false},"excerpt":{"rendered":"

Por enquanto essa configurando ser\u00e1 apenas para o apache. Para saber mais sobre HSTP acesse. Verifica\u00e7\u00e3o do m\u00f3dulo Valide se o m\u00f3dulo heards est\u00e1 habilitado em seu servidor executando: Deveria mostrar algo como: Essa verifica\u00e7\u00e3o pode ser feita tamb\u00e9m observando se existe o arquivo \/etc\/apache2\/mods-enabled\/headers.load. Caso n\u00e3o tenha o m\u00f3dulo habilitado, habilite com o comando […]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6,18],"tags":[30,79,115,155],"_links":{"self":[{"href":"https:\/\/bfnetworks.com.br\/wp-json\/wp\/v2\/posts\/1955"}],"collection":[{"href":"https:\/\/bfnetworks.com.br\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bfnetworks.com.br\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bfnetworks.com.br\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bfnetworks.com.br\/wp-json\/wp\/v2\/comments?post=1955"}],"version-history":[{"count":12,"href":"https:\/\/bfnetworks.com.br\/wp-json\/wp\/v2\/posts\/1955\/revisions"}],"predecessor-version":[{"id":1969,"href":"https:\/\/bfnetworks.com.br\/wp-json\/wp\/v2\/posts\/1955\/revisions\/1969"}],"wp:attachment":[{"href":"https:\/\/bfnetworks.com.br\/wp-json\/wp\/v2\/media?parent=1955"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bfnetworks.com.br\/wp-json\/wp\/v2\/categories?post=1955"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bfnetworks.com.br\/wp-json\/wp\/v2\/tags?post=1955"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}