<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Serov.eu &#187; ssl</title>
	<atom:link href="https://serov.eu/?feed=rss2&#038;tag=ssl" rel="self" type="application/rss+xml" />
	<link>https://serov.eu</link>
	<description>Блог программиста</description>
	<lastBuildDate>Thu, 30 Apr 2026 12:31:53 +0000</lastBuildDate>
	<language>ru-RU</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.15</generator>
	<item>
		<title>Set up Nginx</title>
		<link>https://serov.eu/?p=418</link>
		<comments>https://serov.eu/?p=418#comments</comments>
		<pubDate>Thu, 22 Aug 2019 10:22:29 +0000</pubDate>
		<dc:creator><![CDATA[Evgen]]></dc:creator>
				<category><![CDATA[Программирование]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">https://serov.eu/?p=418</guid>
		<description><![CDATA[Now we need to add a new snippet with ssl-params. Go to snippets directory and create a new one. cd /etc/nginx/snippets nano ssl.conf Add the following lines, save and exit the editor (Ctrl+X, Y, Enter). ssl_session_timeout 1d; ssl_session_cache shared:SSL:50m; ssl_session_tickets on; ssl_protocols TLSv1.2; ssl_ciphers ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES256-SHA384; ssl_ecdh_curve secp384r1; ssl_prefer_server_ciphers on; ssl_stapling on; ssl_stapling_verify on; add_header Strict-Transport-Security "max-age=15768000; includeSubdomains; &#8230; <a href="https://serov.eu/?p=418" class="more-link">Читать далее <span class="screen-reader-text">Set up Nginx</span></a>]]></description>
				<content:encoded><![CDATA[<p>Now we need to add a new snippet with ssl-params.</p>
<p>Go to snippets directory and create a new one.</p>
<div class="highlight highlight-source-shell">
<pre><span class="pl-c1">cd</span> /etc/nginx/snippets
nano ssl.conf</pre>
</div>
<p>Add the following lines, save and exit the editor (<code>Ctrl+X</code>, <code>Y</code>, <code>Enter</code>).</p>
<div class="highlight highlight-source-nginx">
<pre><span class="pl-k">ssl_session_timeout</span> <span class="pl-s">1d</span>;
<span class="pl-k">ssl_session_cache</span> shared:SSL:50m;
<span class="pl-k">ssl_session_tickets</span> on;

<span class="pl-k">ssl_protocols</span> TLSv1.2;
<span class="pl-k">ssl_ciphers</span> ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES256-SHA384;
<span class="pl-k">ssl_ecdh_curve</span> secp384r1;
<span class="pl-k">ssl_prefer_server_ciphers</span><span class="pl-c1"> on</span>;

<span class="pl-k">ssl_stapling</span> on;
<span class="pl-k">ssl_stapling_verify</span> on;

<span class="pl-k">add_header</span> Strict-Transport-Security <span class="pl-s">"max-age=15768000; includeSubdomains; preload"</span>;
<span class="pl-k">add_header</span> X-Frame-Options DENY;
<span class="pl-k">add_header</span> X-Content-Type-Options nosniff;</pre>
</div>
<p>Then you have to create a directory for certificates snippets.</p>
<div class="highlight highlight-source-shell">
<pre>mkdir certs
<span class="pl-c1">cd</span> certs</pre>
</div>
<p>Create a new file that will hold certificate&#8217;s params.</p>
<div class="highlight highlight-source-shell">
<pre>nano example.com</pre>
</div>
<p>Add paths to the wildcard certificate.</p>
<div class="highlight highlight-source-nginx">
<pre><span class="pl-k">ssl_certificate</span> /etc/letsencrypt/live/example.com/fullchain.pem;
<span class="pl-k">ssl_certificate_key</span> /etc/letsencrypt/live/example.com/privkey.pem;
<span class="pl-k">ssl_trusted_certificate</span> /etc/letsencrypt/live/example.com/fullchain.pem;</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>https://serov.eu/?feed=rss2&#038;p=418</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Переводим сайт на HTTPS</title>
		<link>https://serov.eu/?p=256</link>
		<comments>https://serov.eu/?p=256#comments</comments>
		<pubDate>Mon, 12 Mar 2018 18:09:11 +0000</pubDate>
		<dc:creator><![CDATA[Evgen]]></dc:creator>
				<category><![CDATA[Программирование]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">https://serov.eu/?p=256</guid>
		<description><![CDATA[В свете новостей Google Chrome начнет помечать все http страницы как «не защищенные» с релизом Chrome 68 в июле 2018 Первым шагом заходим на бота от letsencrypt.org https://certbot.eff.org/#ubuntutrusty-apache и следуем инструкции, для моей версии подходило следующее $ sudo apt-get update $ sudo apt-get install software-properties-common $ sudo add-apt-repository ppa:certbot/certbot $ sudo apt-get update $ sudo &#8230; <a href="https://serov.eu/?p=256" class="more-link">Читать далее <span class="screen-reader-text">Переводим сайт на HTTPS</span></a>]]></description>
				<content:encoded><![CDATA[<p>В свете новостей</p>
<p><strong>Google Chrome начнет помечать все http страницы как «не защищенные» с релизом Chrome 68 в июле 2018</strong></p>
<p>Первым шагом заходим на бота от letsencrypt.org</p>
<p>https://certbot.eff.org/#ubuntutrusty-apache</p>
<p>и следуем инструкции, для моей версии подходило следующее<br />
<code><br />
$ sudo apt-get update<br />
$ sudo apt-get install software-properties-common<br />
$ sudo add-apt-repository ppa:certbot/certbot<br />
$ sudo apt-get update<br />
$ sudo apt-get install python-certbot-apache  </p>
<p>$ sudo certbot --apache<br />
</code><br />
и перевыпуск<br />
<code><br />
sudo certbot renew --dry-run<br />
</code></p>
<p><span id="more-256"></span></p>
<p>Все, теперь у нас готовый бесплатный сертификат на 3 месяца от гугла.</p>
<p>Далее обновляет БД</p>
<p><code><br />
&nbsp;</p>
<p>UPDATE wp_posts SET guid = replace(guid, 'http://serov.eu','https://serov.eu');</p>
<p>UPDATE `wp_posts` SET post_content = REPLACE(post_content, 'src="http://serov.eu', 'src="https://serov.eu')<br />
WHERE post_content LIKE '%src="http://serov.eu%';</p>
<p>UPDATE `wp_posts` SET post_content = REPLACE(post_content, 'src='http://serov.eu', 'src='https://serov.eu')<br />
WHERE post_content LIKE "%src='http://serov.eu%";</p>
<p>UPDATE `wp_posts` SET post_content = REPLACE(post_content, 'href="http://serov.eu', 'href="https://serov.eu')<br />
WHERE post_content LIKE '%href="http://serov.eu%';</p>
<p>UPDATE `wp_posts` SET post_content = REPLACE(post_content, 'href='http://serov.eu', 'href='https://serov.eu')<br />
WHERE post_content LIKE "%href='http://serov.eu%";</p>
<p>UPDATE `wp_posts` SET pinged = REPLACE(pinged, 'http://serov.eu', 'https://serov.eu')<br />
WHERE pinged LIKE '%http://serov.eu%';</p>
<p>SELECT * FROM `WP_DB_NAME`.`wp_posts` WHERE (CONVERT(`ID` USING utf8) LIKE '%%http://serov.eu%%' OR CONVERT(`post_author` USING utf8) LIKE '%%http://serov.eu%%' OR CONVERT(`post_date` USING utf8) LIKE '%%http://serov.eu%%' OR CONVERT(`post_date_gmt` USING utf8) LIKE '%%http://serov.eu%%' OR CONVERT(`post_content` USING utf8) LIKE '%%http://serov.eu%%' OR CONVERT(`post_title` USING utf8) LIKE '%%http://serov.eu%%' OR CONVERT(`post_excerpt` USING utf8) LIKE '%%http://serov.eu%%' OR CONVERT(`post_status` USING utf8) LIKE '%%http://serov.eu%%' OR CONVERT(`comment_status` USING utf8) LIKE '%%http://serov.eu%%' OR CONVERT(`ping_status` USING utf8) LIKE '%%http://serov.eu%%' OR CONVERT(`post_password` USING utf8) LIKE '%%http://serov.eu%%' OR CONVERT(`post_name` USING utf8) LIKE '%%http://serov.eu%%' OR CONVERT(`to_ping` USING utf8) LIKE '%%http://serov.eu%%' OR CONVERT(`pinged` USING utf8) LIKE '%%http://serov.eu%%' OR CONVERT(`post_modified` USING utf8) LIKE '%%http://serov.eu%%' OR CONVERT(`post_modified_gmt` USING utf8) LIKE '%%http://serov.eu%%' OR CONVERT(`post_content_filtered` USING utf8) LIKE '%%http://serov.eu%%' OR CONVERT(`post_parent` USING utf8) LIKE '%%http://serov.eu%%' OR CONVERT(`menu_order` USING utf8) LIKE '%%http://serov.eu%%' OR CONVERT(`post_type` USING utf8) LIKE '%%http://serov.eu%%' OR CONVERT(`post_mime_type` USING utf8) LIKE '%%http://serov.eu%%' OR CONVERT(`comment_count` USING utf8) LIKE '%%http://serov.eu%%');</p>
<p>UPDATE `wp_comments` SET comment_author_url = REPLACE(comment_author_url, 'http://serov.eu', 'https://serov.eu')<br />
WHERE comment_author_url LIKE '%http://serov.eu%';</p>
<p>UPDATE `wp_comments` SET comment_content = REPLACE(comment_content, 'http://serov.eu', 'https://serov.eu')<br />
WHERE comment_content LIKE '%http://serov.eu%';</p>
<p>UPDATE `wp_postmeta` SET `meta_value` = REPLACE(meta_value, 'http://serov.eu', 'https://serov.eu')<br />
WHERE meta_value LIKE '%http://serov.eu%';</p>
<p>UPDATE `wp_options` SET `option_value` = "https://serov.eu" WHERE `wp_options`.`option_name` = 'siteurl';</p>
<p>UPDATE `wp_options` SET `option_value` = "https://serov.eu" WHERE `wp_options`.`option_name` = 'home';</p>
<p>&nbsp;<br />
</code></p>
<p>На все ушло минут 10</p>
<p>не забываем добавить в крон<br />
<code><br />
@monthly certbot renew --dry-run<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>https://serov.eu/?feed=rss2&#038;p=256</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
