<?xml version="1.0" encoding="utf-8"?> 
<rss version="2.0"
  xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
  xmlns:atom="http://www.w3.org/2005/Atom">

<channel>

<title>Блог: заметки с тегом эгея</title>
<link>https://www.utata.ru/tags/egeya/</link>
<description>konditerov.ru</description>
<author>Илья Кондитеров</author>
<language>ru</language>
<generator>E2 (v3877; Aegea)</generator>

<itunes:owner>
<itunes:name>Илья Кондитеров</itunes:name>
<itunes:email></itunes:email>
</itunes:owner>
<itunes:subtitle>konditerov.ru</itunes:subtitle>
<itunes:image href="" />
<itunes:explicit></itunes:explicit>

<item>
<title>Конфиг nginx Эгея for vestacp</title>
<guid isPermaLink="false">78</guid>
<link>https://www.utata.ru/all/konfig-nginx-egeya-for-vestacp/</link>
<pubDate>Tue, 09 Oct 2018 00:38:04 +0300</pubDate>
<author>Илья Кондитеров</author>
<comments>https://www.utata.ru/all/konfig-nginx-egeya-for-vestacp/</comments>
<description>
&lt;p&gt;Настройка &lt;a href="https://blogengine.ru"&gt;Эгеи&lt;/a&gt; под &lt;a href="https://vestacp.com"&gt;VestaCP&lt;/a&gt; (nginx)&lt;/p&gt;
&lt;p&gt;В папку с правами 644 пользователь root:&lt;br /&gt;
&lt;b&gt;nginx + php-fpm&lt;/b&gt;&lt;br /&gt;
/usr/local/vesta/data/templates/web/nginx/php-fpm5&lt;/p&gt;
&lt;p&gt;&lt;b&gt;egea.tpl&lt;/b&gt;&lt;/p&gt;
&lt;pre class="e2-text-code"&gt;&lt;code class=""&gt;server {
    http2      on;
    listen      %ip%:%web_port%;
    server_name %domain_idn% %alias_idn%;
    root        %docroot%;
    index       index.php index.html index.htm;
    access_log  /var/log/nginx/domains/%domain%.log combined;
    access_log  /var/log/nginx/domains/%domain%.bytes bytes;
    error_log   /var/log/nginx/domains/%domain%.error.log error;
#   if you need to rewrite www to non-www uncomment bellow
#   if ($host != '%domain%' ) {
#       rewrite      ^/(.*)$  http://%domain%/$1  permanent;
#    }
    location = /favicon.ico {
        log_not_found off;
        access_log off;
    }

    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }

    location / {
        try_files $uri $uri/ @rewrite;
        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
            expires     max;
        }
    }
    location @rewrite {
        rewrite ^/(.*)$ /index.php?go=$uri;
    }

    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_pass %backend_lsnr%;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $request_filename;
        include /etc/nginx/fastcgi_params;
    }

    error_page  403 /error/404.html;
    error_page  404 /error/404.html;
    error_page  500 502 503 504 /error/50x.html;

    location /error/ {
        alias   %home%/%user%/web/%domain%/document_errors/;
    }

    location ~* &amp;quot;/\.(htaccess|htpasswd)$&amp;quot; {
        deny    all;
        return  404;
    }

    location /vstats/ {
        alias   %home%/%user%/web/%domain%/stats/;
        include %home%/%user%/conf/web/%domain%.auth*;
    }

    include     /etc/nginx/conf.d/phpmyadmin.inc*;
    include     /etc/nginx/conf.d/phppgadmin.inc*;
    include     /etc/nginx/conf.d/webmail.inc*;

    include     %home%/%user%/conf/web/nginx.%domain%.conf*;
}&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;и файл&lt;br /&gt;
&lt;b&gt;egea.stpl&lt;/b&gt;&lt;/p&gt;
&lt;pre class="e2-text-code"&gt;&lt;code class=""&gt;server {
    http2      on;
    listen      %ip%:%web_ssl_port% ssl
    server_name %domain_idn% %alias_idn%;
    root        %sdocroot%;
    index       index.php index.html index.htm;
    access_log  /var/log/nginx/domains/%domain%.log combined;
    access_log  /var/log/nginx/domains/%domain%.bytes bytes;
    error_log   /var/log/nginx/domains/%domain%.error.log error;

    ssl_certificate      %ssl_pem%;
    ssl_certificate_key  %ssl_key%;
#   if you need to rewrite www to non-www uncomment bellow
#   if ($host != '%domain%' ) {
#       rewrite      ^/(.*)$  https://%domain%/$1  permanent;
#    }
    location = /favicon.ico {
        log_not_found off;
        access_log off;
    }

    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }

    location / {
        try_files $uri $uri/ @rewrite;
        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
            expires     max;
        }
    }
    location @rewrite {
        rewrite ^/(.*)$ /index.php?go=$uri;
    }

    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_pass %backend_lsnr%;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $request_filename;
        include /etc/nginx/fastcgi_params;
    }

    error_page  403 /error/404.html;
    error_page  404 /error/404.html;
    error_page  500 502 503 504 /error/50x.html;

    location /error/ {
        alias   %home%/%user%/web/%domain%/document_errors/;
    }

    location ~* &amp;quot;/\.(htaccess|htpasswd)$&amp;quot; {
        deny    all;
        return  404;
    }

    location /vstats/ {
        alias   %home%/%user%/web/%domain%/stats/;
        include %home%/%user%/conf/web/%domain%.auth*;
    }

    include     /etc/nginx/conf.d/phpmyadmin.inc*;
    include     /etc/nginx/conf.d/phppgadmin.inc*;
    include     /etc/nginx/conf.d/webmail.inc*;

    include     %home%/%user%/conf/web/snginx.%domain%.conf*;
}&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;потом выбираем Web Template NGINX — &lt;b&gt;egea&lt;/b&gt; и пользуемся&lt;/p&gt;
&lt;div class="e2-text-picture"&gt;
&lt;img src="https://www.utata.ru/pictures/--2018-10-09--0.38.32.png" width="512" height="220" alt="" /&gt;
&lt;/div&gt;
&lt;div class="e2-text-picture"&gt;
&lt;img src="https://www.utata.ru/pictures/--2018-10-09--0.38.26.png" width="448" height="176" alt="" /&gt;
&lt;/div&gt;
</description>
</item>

<item>
<title>Переадресация эгея с http на https</title>
<guid isPermaLink="false">28</guid>
<link>https://www.utata.ru/all/pereadresaciya-egeya-s-http-na-https/</link>
<pubDate>Tue, 31 Jan 2017 23:53:45 +0300</pubDate>
<author>Илья Кондитеров</author>
<comments>https://www.utata.ru/all/pereadresaciya-egeya-s-http-na-https/</comments>
<description>
&lt;p&gt;&lt;b&gt;/system/core.php&lt;/b&gt;&lt;br /&gt;
Комментируем&lt;/p&gt;
&lt;pre class="e2-text-code"&gt;&lt;code class=""&gt;if($_SERVER['SERVER_PORT']!=&amp;lt;часть кода удалена&amp;gt;. $_SERVER['SERVER_PORT'];&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Открываем файл &lt;b&gt;.htaccess&lt;/b&gt; и после&lt;/p&gt;
&lt;pre class="e2-text-code"&gt;&lt;code class=""&gt;RewriteEngine on&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Добавляем две строки:&lt;/p&gt;
&lt;pre class="e2-text-code"&gt;&lt;code class=""&gt;RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;b&gt;Чистим кэш&lt;/b&gt;&lt;br /&gt;
После дополнительно нужно очистить кэш, эту процедуру можно выполнить при помощи ввода адреса domain.ru/@sync/&lt;/p&gt;
&lt;p&gt;В итоге мы получаем автоматический 301 редирект на https с любой страницы сайта, с приставкой https.&lt;/p&gt;
</description>
</item>


</channel>
</rss>