{"id":256901,"date":"2015-05-10T01:29:02","date_gmt":"2015-05-09T21:29:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=256901"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=256901","title":{"rendered":"\u041a\u0430\u043a \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0441\u0430\u0439\u0442 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u043d\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 HTTPS \u0434\u043b\u044f \u0432\u0441\u0435\u0445"},"content":{"rendered":"<br \/>\n<h4>\u0428\u0438\u0444\u0440\u0443\u0435\u043c \u0432\u0441\u0451 \u043f\u043e\u0434\u0440\u044f\u0434<\/h4>\n<p>  \u042d\u0440\u0430 \u043d\u0435\u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u0435\u0431\u0430 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442, \u0438 \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e. \u0412 \u044d\u0442\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043c\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c, \u0447\u0442\u043e \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 Nginx. \u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u0435\u043b\u0438 \u0441\u0430\u0439\u0442\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c HTTPS. \u041a\u0440\u043e\u043c\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u043c HSTS \u2013 \u044d\u0442\u043e \u00abHTTP Strict Transport Security\u00bb, \u043a\u043e\u0433\u0434\u0430 \u0441\u0430\u0439\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 HTTPS, \u043d\u043e \u0438 \u043d\u0430\u0441\u0442\u0430\u0438\u0432\u0430\u0435\u0442 \u043d\u0430 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432, \u043d\u043e \u044f \u043e\u043f\u0438\u0448\u0443 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u00abHTTPS termination\u00bb. \u0418\u043d\u0430\u0447\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u043c\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u043f\u0435\u0440\u0435\u0434 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u043f\u0440\u043e\u043a\u0441\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0442\u044c HTTPS. \u042d\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0449\u0435 \u0438 \u0433\u0438\u0431\u0447\u0435, \u0447\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c HTTPS \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u0430\u043c \u043f\u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0442\u0440\u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u044b\u043c, \u0447\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0435\u0449\u0451 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0441\u0442\u043e\u043f\u043a\u0443 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442 \u0432\u0430\u0448\u0443 \u0436\u0438\u0437\u043d\u044c \u2013 \u043d\u043e \u044d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0430\u043a.<\/p>\n<p>  \u0423\u0442\u043e\u0447\u043d\u0438\u043c, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0446\u0435\u043f\u0442 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u043d\u0430 \u0431\u0430\u0437\u0435 Linux, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d Nginx. <\/p>\n<p>  \u0422\u043e, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u0441\u0442\u043e\u043f\u043a\u0435 \u2013 \u044d\u0442\u043e HAProxy. \u042d\u0442\u043e \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u2013 \u043e\u043d \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438. \u041c\u043d\u043e\u0433\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0441\u0430\u0439\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0435\u0433\u043e \u0432 \u044d\u0442\u043e\u043c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 (\u0442\u043e\u0442 \u0436\u0435 reddit), \u043d\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0443 \u043d\u0435\u0433\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c SSL termination. \u041e\u043d \u0443\u043c\u0435\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c HTTPS-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c HAProxy, \u0441\u043a\u043e\u0440\u043c\u0438\u043c \u0435\u043c\u0443 \u043d\u0430\u0448\u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b SSL\/TLS, \u043f\u043e\u0440\u0443\u0447\u0438\u043c \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u044f\u0432\u043b\u044f\u0442\u044c \u0432\u0441\u0435 HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 HTTPS, \u0438 \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u0435\u043c\u0443 \u0443\u0436\u0435 \u0441\u0430\u043c \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u044d\u043a\u0435\u043d\u0434\u0430.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 HAProxy<\/h4>\n<p>  \u041f\u043e\u0440\u0442\u044b 80 \u0438 443 \u0431\u0443\u0434\u0443\u0442 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c HTTP \u0438 HTTPS \u0442\u0440\u0430\u0444\u0438\u043a. \u0412\u0441\u0435 HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0442 \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442 301 \u043d\u0430 \u0442\u043e\u0442 \u0436\u0435 URL, \u043d\u043e \u043f\u043e HTTPS, \u0438 \u0437\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u044f\u0442\u0441\u044f \u043d\u0430 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u0432\u044b\u0439 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 (nginx) \u043f\u043e \u0447\u0438\u0441\u0442\u043e\u043c\u0443 HTTP. <\/p>\n<p>  HAProxy package, \u0432\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u044b\u0439 \u0432 \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0443 Ubuntu 14.04 LTS \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u0440\u044b\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439:<\/p>\n<pre><code class=\"bash\">sudo add-apt-repository ppa:vbernat\/haproxy-1.5 <\/code><\/pre>\n<p>  \u0417\u0430\u0442\u0435\u043c \u043e\u0431\u043d\u043e\u0432\u0438\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"bash\">sudo aptitude update sudo aptitude install haproxy <\/code><\/pre>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043b\u0435\u0436\u0430\u0442 \u0432 \/etc\/haproxy\/haproxy.cfg. \u0412\u043e\u0442 \u043c\u043e\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:<\/p>\n<pre><code class=\"bash\">global     log \/dev\/log    local0     log \/dev\/log    local1 notice     chroot \/var\/lib\/haproxy     stats socket \/run\/haproxy\/admin.sock mode 660 level admin     stats timeout 30s     user haproxy     group haproxy     daemon       # Default SSL material locations     ca-base \/etc\/ssl\/certs     crt-base \/etc\/ssl\/private       ssl-default-bind-ciphers  EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH+aRSA+RC4:EECDH:EDH+aRSA:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4     ssl-default-bind-options no-sslv3 no-tlsv10     tune.ssl.default-dh-param 4096   defaults     log     global     mode http     option  httplog     option  dontlognull     option  forwardfor     option  http-server-close     timeout connect 5000     timeout client  50000     timeout server  50000     errorfile 400 \/etc\/haproxy\/errors\/400.http     errorfile 403 \/etc\/haproxy\/errors\/403.http     errorfile 408 \/etc\/haproxy\/errors\/408.http     errorfile 500 \/etc\/haproxy\/errors\/500.http     errorfile 502 \/etc\/haproxy\/errors\/502.http     errorfile 503 \/etc\/haproxy\/errors\/503.http     errorfile 504 \/etc\/haproxy\/errors\/504.http   frontend yourservername     bind *:80     bind *:443 ssl crt \/etc\/ssl\/private\/cert1.pem crt \/etc\/ssl\/private\/cert2.pem     acl secure dst_port eq 443     redirect scheme https if !{ ssl_fc }     rspadd Strict-Transport-Security:\\ max-age=31536000;\\ includeSubDomains;\\ preload     rsprep ^Set-Cookie:\\ (.*) Set-Cookie:\\ \\1;\\ Secure if secure     default_backend webservername   backend webservername     http-request set-header X-Forwarded-Port %[dst_port]     http-request add-header X-Forwarded-Proto https if { ssl_fc }     server webservername 192.168.1.50:80   listen stats *:9999     stats enable     stats uri \/ <\/code><\/pre>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0430 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0430 HAProxy \u0434\u043b\u044f vim, \u0435\u0451 \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0437\u0434\u0435\u0441\u044c. \u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435.<\/p>\n<h4>Global<\/h4>\n<p>  \u041e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u043a\u0443\u0441\u043e\u043a \u043d\u0435\u0442\u0440\u043e\u043d\u0443\u0442\u044b\u043c. \u042d\u0442\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043b\u043e\u0433\u043e\u0432, \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0438 \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430.<\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0447\u0430\u0441\u0442\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u2013 \u0442\u0430\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u043e, \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f CA root \u0438 \u043b\u0435\u0436\u0430\u0442 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b SSL\/TLS. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c ca-base \u0438 crt-base.<\/p>\n<p>  \u0421\u0442\u0440\u043e\u043a\u0430 ssl-default-bind-ciphers \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0430\u043a\u0438\u0435 \u043a\u043e\u0434\u044b SSL\/TLS \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f HAProxy \u043f\u0440\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0438 \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c. \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0442 Qualys\/SSL Labs. \u042f \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0441\u0442\u0440\u043e\u0447\u043a\u0443 ssl-default-bind-options \u0438 \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u043b SSLv3 \u0438 TLS1.0, \u0442.\u043a. \u043e\u043d\u0438 \u0434\u044b\u0440\u044f\u0432\u044b\u0435. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0441\u0442\u0440\u043e\u043a\u0430, tune.ssl.default-dh-param, \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 4096 \u0431\u0438\u0442 \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 Diffie-Hellman \u043f\u0440\u0438 \u043e\u0431\u043c\u0435\u043d\u0435 \u043a\u043b\u044e\u0447\u0430\u043c\u0438 DHE.<\/p>\n<h4>Defaults<\/h4>\n<p>  \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0430\u0440\u0443 \u0432\u0435\u0449\u0435\u0439 \u2014 forwardfor \u0438 http-server-close. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u043e\u043a\u0441\u0438, \u043e\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440\u0443 IP-\u0430\u0434\u0440\u0435\u0441\u0430, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0434\u0443\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u0418\u043d\u0430\u0447\u0435 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c, \u0431\u0443\u0434\u0442\u043e \u0432\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u0438\u0434\u0451\u0442 \u0441 HAProxy. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 forwardfor \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u043f\u0440\u043e\u043a\u0441\u0438, \u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a X-Forwarded For \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430. <\/p>\n<p>  \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 http-server-close \u043d\u0443\u0436\u043d\u0430 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u2014 HAProxy \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0448\u0430\u0442\u044c, \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u043b\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0435 \u0432\u0435\u0449\u0438 \u0432\u0440\u043e\u0434\u0435 WebSockets.<\/p>\n<h4>Certificates<\/h4>\n<p>  \u041f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0435\u043a\u0446\u0438\u0438 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442, \u043a\u0430\u043a\u043e\u0439 \u0442\u0440\u0430\u0444\u0438\u043a HAproxy \u0434\u043e\u043b\u0436\u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438 \u043a\u0443\u0434\u0430 \u0435\u0433\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c.<\/p>\n<p>  \u041c\u044b \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u043c HAproxy \u043a \u043f\u043e\u0440\u0442\u0430\u043c 80 \u0438 443, \u043e\u043d\u0430 \u0441\u043b\u0443\u0448\u0430\u0435\u0442 HTTP \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 80 \u0438 HTTPS \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 443. \u0414\u043b\u044f HTTP \u043c\u044b \u0441\u043a\u0430\u0440\u043c\u043b\u0438\u0432\u0430\u0435\u043c \u0435\u0439 \u0434\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430. HAproxy \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 Server Name Identification (SNI) \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0445\u043e\u0441\u0442 \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c SSL\/TLS \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u043c. \u0423 \u043c\u0435\u043d\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0435\u0441\u0442\u044c \u0442\u0440\u0438 \u0441\u0430\u0439\u0442\u0430, \u043e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u043e\u0432\u044b\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b (*.bigdinosaur.org, *.chroniclesofgeorge.com \u0438 *.bigsaur.us) \u0438 HAProxy \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u043d\u0443\u0436\u043d\u044b\u0439 \u0438\u0437 \u043d\u0438\u0445.<\/p>\n<p>  \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u0447\u0442\u043e \u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u2013 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u0438 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u0432 \u043e\u0434\u0438\u043d .pem:<\/p>\n<pre><code class=\"bash\">cat your-decrypted-ssl-key.key your-ssl-cert.crt &gt; your-ssl-cert.pem <\/code><\/pre>\n<p>  \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u043c \u0444\u0430\u0439\u043b\u0430 \u0431\u0443\u0434\u0435\u0442 root:root, \u0438 \u043f\u0440\u0430\u0432\u0430 \u0443 \u043d\u0435\u0433\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"bash\">sudo chown root:root your-ssl-cert.pem chmod 400 your-ssl-cert.pem <\/code><\/pre>\n<h4>\u041e\u0442 HTTP \u043a HTTPS, \u0438 HSTS \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u043e\u043d\u0443\u0441\u0430<\/h4>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c ACL, \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430. \u0412 HAProxy \u044d\u0442\u043e \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0435\u0449\u0435\u0439, \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u044e\u0449\u0438\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c\u0443 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044e:<\/p>\n<pre><code class=\"bash\">acl secure dst_port eq 443 <\/code><\/pre>\n<p>  \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 ACL \u043f\u043e \u0438\u043c\u0435\u043d\u0438 secure, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441\u043e \u0432\u0441\u0435\u043c, \u0447\u0442\u043e \u0438\u0434\u0451\u0442 \u043d\u0430 TCP \u043f\u043e\u0440\u0442 443. \u041e\u043d \u043d\u0430\u043c \u0441\u043a\u043e\u0440\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f.<\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u2013 \u0442\u0430 \u0441\u0430\u043c\u0430\u044f, \u0433\u0434\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0441 HTTP \u043d\u0430 HTTPS.<\/p>\n<pre><code class=\"bash\">redirect scheme https if !{ ssl_fc } <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0435 HTTPS, \u0442\u043e \u043d\u0430\u0434\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 301 \u043a \u0442\u043e\u043c\u0443 \u0436\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u0443, \u043d\u043e \u043f\u043e \u0441\u0445\u0435\u043c\u0435 HTTPS.<\/p>\n<p>  \u042d\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u043e HTTP Strict Transport Security \u2013 \u0432\u0441\u0435\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u043c \u043f\u0440\u0435\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 HTTPS:<\/p>\n<pre><code class=\"bash\">rspadd Strict-Transport-Security:\\ max-age=31536000;\\ includeSubDomains;\\ preload <\/code><\/pre>\n<p>  \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0443\u0436\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438. \u0411\u0440\u0430\u0443\u0437\u0435\u0440, \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u044e\u0449\u0438\u0439 \u044d\u0442\u043e\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442, \u0447\u0442\u043e \u0441\u0430\u0439\u0442 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e HTTPS, \u0438 \u044d\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0433\u043e\u0434\u0430 (31,536,000 seconds). \u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 preload \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 Google-\u0431\u043e\u0442\u0443, \u0447\u0442\u043e \u0432\u0430\u0448 \u0441\u0430\u0439\u0442 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0438\u0445 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0430\u0439\u0442\u043e\u0432, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0445 HSTS.<\/p>\n<p>  HSTS \u2013 \u0448\u0442\u0443\u043a\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f. \u0428\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432\u0441\u0435\u0433\u0434\u0430, \u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430\u043c \u043d\u0430\u0434\u043e \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u044c\u0441\u044f \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0442\u044c \u0435\u0433\u043e \u0432\u0435\u0437\u0434\u0435.<\/p>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438 \u2013 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u043a\u0443\u043a\u0438 \u0442\u0430\u043a\u0436\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u043b\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 secure, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432\u0441\u0451 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u043e\u0431\u044b\u0447\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 HTTP. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0443 rsprep:<br \/>  1<\/p>\n<pre><code class=\"bash\">rsprep ^Set-Cookie:\\ (.*) Set-Cookie:\\ \\1;\\ Secure if secure <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u00abif secure\u00bb. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0443\u043a\u0438, \u0438\u0434\u0443\u0449\u0438\u0435 \u043f\u043e HTTPS (secure \u2013 \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0438\u043d\u0438\u0439 \u043d\u0430\u0437\u0430\u0434 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438). \u0412\u043e\u043e\u0431\u0449\u0435, \u0432\u0441\u0451 \u0434\u043e\u043b\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 HTTPS, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044d\u0442\u043e \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u2013 \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0438 \u043f\u043e\u0434\u0441\u0442\u0440\u0430\u0445\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0443\u0434\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a. \u042d\u0442\u043e default_backend. \u0422\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0442.\u043f. \u041d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043e\u0434\u0438\u043d \u0431\u044d\u043a\u0435\u043d\u0434-\u0441\u0435\u0440\u0432\u0435\u0440, \u0442\u043e \u0432\u0441\u0451 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e.<\/p>\n<h4>back end<\/h4>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0443 \u043d\u0430\u0441 \u043e\u0434\u0438\u043d \u0431\u044d\u043a\u0435\u043d\u0434-\u0441\u0435\u0440\u0432\u0435\u0440, \u044d\u0442\u0430 \u0441\u0435\u043a\u0446\u0438\u044f \u043a\u043e\u0440\u043e\u0442\u043a\u0430. HAProxy \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043b\u0438\u0448\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0443 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 HTTPS, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043e\u043d \u0432\u0438\u0434\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0438\u0448\u044c HTTP:<\/p>\n<pre><code class=\"bash\">http-request set-header X-Forwarded-Port %[dst_port] http-request add-header X-Forwarded-Proto https if { ssl_fc } <\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0432\u0430\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u044e\u0449\u0438\u0439, \u0447\u0442\u043e \u043a\u043b\u0438\u0435\u043d\u0442 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0448\u0451\u043b \u043d\u0430 \u043f\u043e\u0440\u0442 443. \u0412\u0442\u043e\u0440\u0430\u044f \u0443\u0441\u0438\u043b\u0438\u0432\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u0443\u044e, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044f X-Forwarded-Proto \u0432 HTTPS, \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u0448\u0451\u043b \u0447\u0435\u0440\u0435\u0437 HTTPS, \u0447\u0442\u043e\u0431\u044b \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u043d\u0438\u043c\u0430\u043b, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u043e\u0442\u0432\u0435\u0442\u043e\u0432.<\/p>\n<p>  \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u043c HAProxy, \u043a\u0443\u0434\u0430 \u0441\u043b\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u2013 \u0438\u043c\u044f, IP \u0438 \u043f\u043e\u0440\u0442 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0423 \u043c\u0435\u043d\u044f \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u0438\u0448\u0443 \u0441\u044e\u0434\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 IP \u0438 80-\u0439 \u043f\u043e\u0440\u0442. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435, \u0442\u043e \u043f\u0438\u0448\u0438\u0442\u0435 localhost \u0438 \u043f\u043e\u0440\u0442.<\/p>\n<h4>\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e<\/h4>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0441\u0435\u043a\u0446\u0438\u044f \u0434\u0438\u043a\u0442\u0443\u0435\u0442 HAProxy \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043f\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0440\u0442\u0443. \u0422\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c basic auth, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 stats auth username:password, \u0438\u043b\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0449\u0438\u0439\u0441\u044f URL.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0443 HSTS \u00abincludesubdomains\u00bb, \u0443 \u0432\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043f\u043e \u0438\u043c\u0435\u043d\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u0435\u0431-\u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0435\u0451 HTTPS-\u0432\u0435\u0440\u0441\u0438\u044e, \u0430 HAProxy \u043e\u0442\u0434\u0430\u0451\u0442 \u0442\u043e\u043b\u044c\u043a\u043e HTTP-\u0432\u0435\u0440\u0441\u0438\u044e. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438, \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043f\u043e IP \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u043e\u0440\u0442\u043e\u043c (http:\/\/192.168.x.x:9999).<\/p>\n<h4>\u041f\u043e\u0434\u0447\u0438\u0449\u0430\u0435\u043c<\/h4>\n<p>  \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u043d\u043e \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0439\u0442\u0435 \u0441\u0435\u0440\u0432\u0438\u0441 HAProxy. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435, \u0438 nginx \u0442\u0430\u043a\u0436\u0435 \u0441\u043b\u0443\u0448\u0430\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043d\u0430 \u043f\u043e\u0440\u0442\u0430\u0445 80 \u0438 443, \u043d\u0443\u0436\u043d\u043e \u043a\u043e\u0435-\u0447\u0442\u043e \u043f\u043e\u0434\u043f\u0440\u0430\u0432\u0438\u0442\u044c.<\/p>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 nginx \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c HTTPS-\u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043d\u0443\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f HTTPS \u0438\u0437 \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432.<\/p>\n<p>  \u0412\u043e\u0442 \u0438 \u0432\u0441\u0451. \u041d\u0443\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0444\u0430\u0439\u043b nginx.conf \u0434\u0432\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e nginx \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u044f\u0442\u044c ip-\u0430\u0434\u0440\u0435\u0441\u0430 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0443 X-Forwarded-For, \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u043e\u0442 127.0.0.1:<\/p>\n<pre><code class=\"bash\">set_real_ip_from 127.0.0.1; real_ip_header X-Forwarded-For; <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0432\u044b \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u043b\u0438 nginx \u0441 \u043e\u043f\u0446\u0438\u0435\u0439 ngx_http_realip_module.<\/p>\n<p>  \u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 HAProxy (service haproxy restart) \u0438 \u043e\u043d\u0430 \u043d\u0430\u0447\u043d\u0451\u0442 \u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b.<\/p>\n<h4>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b<\/h4>\n<p>  \u0421\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0441\u0430\u0439\u0442\u0443 \u0447\u0435\u0440\u0435\u0437 http. \u0415\u0441\u043b\u0438 URL \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 https \u0438 \u0432\u044b \u0432\u0438\u0434\u0438\u0442\u0435 \u0441\u0430\u0439\u0442 \u2013 \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041c\u043e\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a HSTS \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e:<\/p>\n<pre><code class=\"bash\">curl -s -D- https:\/\/yoursite.whatever\/ | grep Strict <\/code><\/pre>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/257609\/\"> http:\/\/habrahabr.ru\/post\/257609\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<br \/>\n<h4>\u0428\u0438\u0444\u0440\u0443\u0435\u043c \u0432\u0441\u0451 \u043f\u043e\u0434\u0440\u044f\u0434<\/h4>\n<p>  \u042d\u0440\u0430 \u043d\u0435\u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u0435\u0431\u0430 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442, \u0438 \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e. \u0412 \u044d\u0442\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043c\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c, \u0447\u0442\u043e \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 Nginx. \u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u0435\u043b\u0438 \u0441\u0430\u0439\u0442\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c HTTPS. \u041a\u0440\u043e\u043c\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u043c HSTS \u2013 \u044d\u0442\u043e \u00abHTTP Strict Transport Security\u00bb, \u043a\u043e\u0433\u0434\u0430 \u0441\u0430\u0439\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 HTTPS, \u043d\u043e \u0438 \u043d\u0430\u0441\u0442\u0430\u0438\u0432\u0430\u0435\u0442 \u043d\u0430 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432, \u043d\u043e \u044f \u043e\u043f\u0438\u0448\u0443 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u00abHTTPS termination\u00bb. \u0418\u043d\u0430\u0447\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u043c\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u043f\u0435\u0440\u0435\u0434 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u043f\u0440\u043e\u043a\u0441\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0442\u044c HTTPS. \u042d\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0449\u0435 \u0438 \u0433\u0438\u0431\u0447\u0435, \u0447\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c HTTPS \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u0430\u043c \u043f\u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0442\u0440\u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u044b\u043c, \u0447\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0435\u0449\u0451 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0441\u0442\u043e\u043f\u043a\u0443 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442 \u0432\u0430\u0448\u0443 \u0436\u0438\u0437\u043d\u044c \u2013 \u043d\u043e \u044d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0430\u043a.<\/p>\n<p>  \u0423\u0442\u043e\u0447\u043d\u0438\u043c, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0446\u0435\u043f\u0442 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u043d\u0430 \u0431\u0430\u0437\u0435 Linux, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d Nginx. <\/p>\n<p>  \u0422\u043e, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u0441\u0442\u043e\u043f\u043a\u0435 \u2013 \u044d\u0442\u043e HAProxy. \u042d\u0442\u043e \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u2013 \u043e\u043d \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438. \u041c\u043d\u043e\u0433\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0441\u0430\u0439\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0435\u0433\u043e \u0432 \u044d\u0442\u043e\u043c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 (\u0442\u043e\u0442 \u0436\u0435 reddit), \u043d\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0443 \u043d\u0435\u0433\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c SSL termination. \u041e\u043d \u0443\u043c\u0435\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c HTTPS-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c HAProxy, \u0441\u043a\u043e\u0440\u043c\u0438\u043c \u0435\u043c\u0443 \u043d\u0430\u0448\u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b SSL\/TLS, \u043f\u043e\u0440\u0443\u0447\u0438\u043c \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u044f\u0432\u043b\u044f\u0442\u044c \u0432\u0441\u0435 HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 HTTPS, \u0438 \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u0435\u043c\u0443 \u0443\u0436\u0435 \u0441\u0430\u043c \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u044d\u043a\u0435\u043d\u0434\u0430.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-256901","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/256901","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=256901"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/256901\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=256901"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=256901"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=256901"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}