Corrections: updated the Switch to HTTPS article

This commit is contained in:
alexandervnuchkov 2018-03-05 18:24:18 +03:00
parent cc7bcfb805
commit ee27cbf5ca
2 changed files with 62 additions and 11 deletions

View File

@ -31,20 +31,41 @@
</div>
</div>
<h2 id="Switch1">Switching Community Server to HTTPS</h2>
<h2 id="Switch1">Creating security certificate and private key</h2>
<div class="block_of_step">
<div class="screen_text">
<p>Before you can start to switch your <b>Community Server</b> to HTTPS protocol, you will need to create a security certificate and the certificate private key.</p>
<p>To automatically generate an SSL certificate using the <a target="_blank" href="https://letsencrypt.org/">letsencrypt service</a> you can refer to <a target="_blank" href="<%=VirtualPathUtility.ToAbsolute("~/server/enterprise/linux/community/switch-to-https.aspx")%>">this article</a>. </p>
<p>Once you have the certificate, proceed with the steps below:</p>
<p>Once you have the certificate, proceed with the steps below.</p>
</div>
</div>
<h2 id="Switch2">Switching Community Server to HTTPS using the provided script</h2>
<div class="block_of_step">
<div class="screen_text">
<p>The faster way to switch <b>Community Server</b> to HTTPS is to use the provided script. It is located here:</p>
<p><code>/var/www/onlyoffice/Tools/default-onlyoffice-ssl.sh</code></p>
<p>Place the created certificates to the <code>/var/www/onlyoffice/Data/certs/</code>. There must be two files there:</p>
<ul>
<li><code>/var/www/onlyoffice/Data/certs/onlyoffice.crt</code></li>
<li><code>/var/www/onlyoffice/Data/certs/onlyoffice.key</code></li>
</ul>
<p>And run the script:</p>
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Server/Common/CommandList/Linux/CommandsForPage/RunCommunityServerConfigurationScript/RunOnlyofficeSSLScript.ascx" />
<p>It will do everything needed to switch your <b>Community Server</b> installation to HTTPS.</p>
</div>
</div>
<h2 id="Switch3">Switching Community Server to HTTPS manually</h2>
<div class="block_of_step">
<div class="screen_text">
<p>You can perform all the script actions manually. For that do the following:</p>
<ol>
<li>Stop the NGINX service:
<pre><code>sudo service nginx stop
</code></pre>
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Server/Common/CommandList/Linux/CommandsForPage/RestartServices/StopNginxService.ascx" />
</li>
<li>Copy the <code>/etc/nginx/includes/onlyoffice-communityserver-common-ssl.conf.template</code> file to the <code>/etc/nginx/sites-available/onlyoffice</code> file using the following command:
<pre><code>sudo cp -f /etc/nginx/includes/onlyoffice-communityserver-common-ssl.conf.template /etc/nginx/sites-available/onlyoffice
</code></pre>
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Server/Common/CommandList/Linux/CommandsForPage/CopySSLConfTemplate/CopySSLConfTemplate.ascx" />
</li>
<li>Edit the <code>/etc/nginx/sites-available/onlyoffice</code> file changing all the parameters in double curly brackets <b>{{...}}</b> for the actually used:
<ul>
@ -60,9 +81,12 @@
</ul>
Please see <a target="_blank" href="http://nginx.org/en/docs/http/ngx_http_ssl_module.html">NGINX documentation</a> for more information on SSL parameters used in the configuration file.
</li>
<li>Open the <code>/var/www/onlyoffice/Services/MailAggregator/ASC.Mail.Aggregator.CollectionService.exe.config</code> configuration file and set the <code>mail.default-api-scheme</code> parameter value to <code>https</code>. After that restart the mail aggregator service:
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Server/Common/CommandList/Linux/CommandsForPage/RestartServices/RestartMailAggregatorService.ascx" />
</li>
<li>Switch <b>Talk</b> to TLS protocol. See <a href="<%=VirtualPathUtility.ToAbsolute("~/server/linux/community/switch-talk-to-tls.aspx")%>">this article</a> to find out how this can be done.</li>
<li>When all the changes are made, you can start NGINX service again:
<pre><code>sudo service nginx start
</code></pre>
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Server/Common/CommandList/Linux/CommandsForPage/RestartServices/StartNginxService.ascx" />
<div class="notehelp">Port 443 must be opened for correct portal operation.</div>
</li>
</ol>

View File

@ -30,13 +30,36 @@
</div>
</div>
</div>
<h2 id="Switch1">Переключение Сервера совместной работы на HTTPS</h2>
<h2 id="Switch1">Создание сертификата безопасности и закрытого ключа</h2>
<div class="block_of_step">
<div class="screen_text">
<p>Прежде чем начинать переключение <b>Сервера совместной работы</b> на протокол HTTPS, необходимо создать сертификат безопасности и закрытый ключ сертификата.</p>
<p>Для автоматической генерации SSL-сертификата с помощью <a target="_blank" href="https://letsencrypt.org/">сервиса letsencrypt</a> вы можете обратиться <a target="_blank" href="<%=VirtualPathUtility.ToAbsolute("~/server/enterprise/linux/community/switch-to-https.aspx")%>">к этой статье</a>. </p>
<p>Когда у вас будет сертификат, переходите к последующим действиям:</p>
<p>Когда у вас будет сертификат, переходите к последующим действиям.</p>
</div>
</div>
<h2 id="Switch2">Переключение Сервера совместной работы на HTTPS с помощью скрипта</h2>
<div class="block_of_step">
<div class="screen_text">
<p>Быстрее всего можно переключить <b>Сервер совместной работы</b> на протокол HTTPS с помощью готового скрипта. Он находится здесь:</p>
<p><code>/var/www/onlyoffice/Tools/default-onlyoffice-ssl.sh</code></p>
<p>Поместите созданные сертификаты в папку <code>/var/www/onlyoffice/Data/certs/</code>. Там должно быть два файла:</p>
<ul>
<li><code>/var/www/onlyoffice/Data/certs/onlyoffice.crt</code></li>
<li><code>/var/www/onlyoffice/Data/certs/onlyoffice.key</code></li>
</ul>
<p>И запустите скрипт:</p>
<pre><code>sudo bash /var/www/onlyoffice/Tools/default-onlyoffice-ssl.sh</code></pre>
<p>Он выполнит все необходимые действия для переключения инсталляции <b>Сервера совместной работы</b> на HTTPS.</p>
</div>
</div>
<h2 id="Switch3">Переключение Сервера совместной работы на HTTPS вручную</h2>
<div class="block_of_step">
<div class="screen_text">
<p>Все действия, которые выполняет скрипт, вы можете выполнить вручную. Для этого сделайте следующее:</p>
<ol>
<li>Остановите сервис NGINX:
<pre><code>sudo service nginx stop
@ -60,6 +83,10 @@
</ul>
Обратитесь к <a target="_blank" href="http://nginx.org/ru/docs/http/ngx_http_ssl_module.html">документации NGINX</a> для получения дополнительной информации о параметрах SSL, которые используются в файле конфигурации.
</li>
<li>Откройте файл конфигурации <code>/var/www/onlyoffice/Services/MailAggregator/ASC.Mail.Aggregator.CollectionService.exe.config</code> и задайте для параметра <code>mail.default-api-scheme</code> значение <code>https</code>. После этого перезапустите сервис почтового агрегатора:
<pre><code>onlyofficeMailAggregator restart</code></pre>
</li>
<li>Переключите <b>Чат</b> на протокол TLS. Обратитесь к <a href="<%=VirtualPathUtility.ToAbsolute("~/server/linux/community/switch-talk-to-tls.aspx")%>">этой статье</a>, чтобы узнать, как это сделать.</li>
<li>Когда все изменения будут внесены, можно снова запустить сервис NGINX:
<pre><code>sudo service nginx start
</code></pre>