<?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>Arquivos https2 - Remontti</title>
	<atom:link href="https://blog.remontti.com.br/tag/https2/feed" rel="self" type="application/rss+xml" />
	<link>https://blog.remontti.com.br/tag/https2</link>
	<description>rudimar@remontti</description>
	<lastBuildDate>Tue, 25 Aug 2020 12:44:06 +0000</lastBuildDate>
	<language>pt-BR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://blog.remontti.com.br/wp-content/uploads/2024/09/icone-rr-80x80.png</url>
	<title>Arquivos https2 - Remontti</title>
	<link>https://blog.remontti.com.br/tag/https2</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Instalação do Nextcloud + HTTP2 + HTTPS + Debian Buster &#8211; Seu próprio servidor de arquivos em nuvem!</title>
		<link>https://blog.remontti.com.br/3557</link>
					<comments>https://blog.remontti.com.br/3557#comments</comments>
		
		<dc:creator><![CDATA[Rudimar Remontti]]></dc:creator>
		<pubDate>Tue, 17 Sep 2019 19:19:38 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutoriais]]></category>
		<category><![CDATA[arquivos]]></category>
		<category><![CDATA[demonio]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[fpm]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[https2]]></category>
		<category><![CDATA[nextcloud]]></category>
		<category><![CDATA[nuvem]]></category>
		<category><![CDATA[php-fpm]]></category>
		<guid isPermaLink="false">https://blog.remontti.com.br/?p=3557</guid>

					<description><![CDATA[<p>Nextcloud tem funcionalidade muito semelhante ao Dropbox, com a diferença de ser código aberto, e assim permitir que qualquer pessoa instalar e operá-lo sem custo em um servidor privado. Nextcloud é um fork do&#46;&#46;&#46;</p>
<p>O post <a href="https://blog.remontti.com.br/3557">Instalação do Nextcloud + HTTP2 + HTTPS + Debian Buster &#8211; Seu próprio servidor de arquivos em nuvem!</a> apareceu primeiro em <a href="https://blog.remontti.com.br">Remontti</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Nextcloud tem funcionalidade muito semelhante ao Dropbox, com a diferença de ser código aberto, e assim permitir que qualquer pessoa instalar e operá-lo sem custo em um servidor privado. Nextcloud é um fork do projeto ownCloud.</p>
<p><strong>Requisito:</strong><br />
1- <a href="https://blog.remontti.com.br/2966" rel="noopener noreferrer" target="_blank">Debian 10 Stretch / Instalação Limpa</a><br />
2- <a href="https://blog.remontti.com.br/3006" rel="noopener noreferrer" target="_blank">Passo-a-passo como criar um servidor WEB Apache + PHP + MariaDB + phpMyAdmin no Debian 10 Buster “LAMP”</a><br />
 Instalação do PHP 7.3 (<strong>Requisito</strong>)<br />
 Instalação do MariaDB 10.3 (<strong>Requisito</strong>)<br />
 Instalação do Apache 2.4 (<strong>Requisito</strong>)<br />
 phpMyAdmin :: (<strong>Opcional</strong>)</p>
<p>Para a instalação irei configurar um domínio virtual no apache. Leia para entender mais sobre domínios virtuais:<br />
<a href="https://blog.remontti.com.br/3464" rel="noopener noreferrer" target="_blank">Como ter diversos sub/domínios no mesmo servidor? (Domínios virtuais com Apache2)</a></p>
<p>Tenha então em seu servidor DNS a configuração do host cloud (ou nome que você preferir) apontando para o IP de seu servidor. </p>
<p>Instalamos mais algumas extensões necessárias do PHP e o redis para fazer caching da memória.</p>
<pre class="remontti-code"># apt install php-fpm php-pclzip php-xmlrpc php-imagick php-redis redis-server php-memcached php-apcu php-imap php-ldap php-intl
# usermod -a -G redis www-data</pre>
<p>Altere o limite de memória do PHP  para pelo menos 512M</p>
<pre class="remontti-code"># sed -i &#039;s/memory_limit = 128M/memory_limit = 512M/&#039; /etc/php/7.3/fpm/php.ini</pre>
<p>Desativamos/Ativamosos mods necessários.</p>
<pre class="remontti-code"># a2enmod proxy_fcgi setenvif mpm_event rewrite headers http2
# a2dismod php7.3
# a2enconf php7.3-fpm
# systemctl enable php7.3-fpm
# systemctl restart php7.3-fpm
# systemctl restart apache2</pre>
<p>Criamos o arquivo que vai representar o host cloud. Vou utilizar como base o diretório /var/www/cloud que vamos criar em seguida.<br />
Não vou entrar em detalhes da criação das configurações, pois basta <a href="https://blog.remontti.com.br/3464" rel="noopener noreferrer" target="_blank">ler o tutorial citado</a>.</p>
<pre class="remontti-code"># vim /etc/apache2/sites-available/cloud.conf</pre>
<pre class="remontti-code">&lt;virtualhost *:80&gt;
        Protocols h2 http/1.1
        ServerName cloud.remontti.com.br
        ServerAdmin noc@remontti.com.br

        DocumentRoot /var/www/cloud 

        &lt;IfModule mod_headers.c&gt;
          Header always set Strict-Transport-Security &quot;max-age=15552000; includeSubDomains&quot;
        &lt;/IfModule&gt; 

        &lt;directory /var/www/cloud/ &gt;
                Options FollowSymLinks
                AllowOverride All
        &lt;/directory&gt; 

        LogLevel warn 
        ErrorLog ${APACHE_LOG_DIR}/error_cloud.log
        CustomLog ${APACHE_LOG_DIR}/access_cloud.log combined
&lt;/virtualhost&gt;</pre>
<pre class="remontti-code"># a2ensite cloud
# systemctl restart apache2
# mkdir /var/www/cloud</pre>
<p>Para ficar bacana vamos obter um certificado grátis com o Let’s Encrypt. Leia o tutorial: <a href="https://blog.remontti.com.br/3548" rel="noopener noreferrer" target="_blank">Criando certificado grátis com Let’s Encrypt para o Apache no Debian 10</a></p>
<pre class="remontti-code"># su - 
# apt update
# apt upgrade
# apt install letsencrypt python-certbot-apache
# systemctl stop apache2
# letsencrypt --authenticator standalone --installer apache -d cloud.remontti.com.br</pre>
<pre class="remontti-code">Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer apache
Enter email address (used for urgent renewal and security notices) (Enter &#039;c&#039; to
cancel): noc@remontti.com.br

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let&#039;s Encrypt project and the non-profit
organization that develops Certbot? We&#039;d like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: N
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for cloud.remontti.com.br
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/cloud-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/cloud-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/cloud-le-ssl.conf

Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you&#039;re confident your site works on HTTPS. You can undo this
change by editing your web server&#039;s configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press &#039;c&#039; to cancel): 2

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://cloud.remontti.com.br

You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=cloud.remontti.com.br
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/cloud.remontti.com.br/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/cloud.remontti.com.br/privkey.pem
   Your cert will expire on 2019-12-16. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot again
   with the &quot;certonly&quot; option. To non-interactively renew *all* of
   your certificates, run &quot;certbot renew&quot;
 - Your account credentials have been saved in your Certbot
   configuration directory at /etc/letsencrypt. You should make a
   secure backup of this folder now. This configuration directory will
   also contain certificates and private keys obtained by Certbot so
   making regular backups of this folder is ideal.
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let&#039;s Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le</pre>
<p>Acesse seu domínio com https e o mesmo já deve estar prontinho para o Nextcloud.<br />
<img decoding="async" src="https://blog.remontti.com.br/wp-content/uploads/2019/09/nexcloud_apache-300x163.png" alt="" width="300" height="163" class="alignnone size-medium wp-image-3573" srcset="https://blog.remontti.com.br/wp-content/uploads/2019/09/nexcloud_apache-300x163.png 300w, https://blog.remontti.com.br/wp-content/uploads/2019/09/nexcloud_apache.png 523w" sizes="(max-width: 300px) 100vw, 300px" /></p>
<p>Não esqueça de<a href="https://blog.remontti.com.br/3548" rel="noopener noreferrer" target="_blank"> criar o script para renovar</a> seu certificado</p>
<p>Finalmente vamos a instalação do Nextcloud! Na data de hoje (set/2019) o projeto se encontra na versão 16.0.4.</p>
<pre class="remontti-code"># apt install unzip wget
# cd /tmp/
# wget https://download.nextcloud.com/server/releases/nextcloud-16.0.4.zip
# unzip nextcloud-*.zip 
# rm -rf /var/www/cloud/
# mv nextcloud /var/www/cloud 
# chown www-data. /var/www/cloud -R</pre>
<p>Crie o banco de dados chamado nextcloud e defina sua senha. Use o <a href="https://senhasegura.remontti.com.br/" rel="noopener noreferrer" target="_blank">gerador de senhas</a>!</p>
<pre class="remontti-code"># mariadb -uroot -p -e\
 &quot;CREATE DATABASE nextcloud character set utf8 collate utf8_bin;\
  GRANT ALL PRIVILEGES ON nextcloud.* TO &#039;nextcloud&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;SUA_SENHA&#039;;&quot;</pre>
<p>Abra agora em seu navegador https://cloud.dominio.com.br e colocar as informações para criar sua conta de administrador, e para conexão com o banco de dados.<br />
<img fetchpriority="high" decoding="async" src="https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao_form.png" alt="" width="515" height="850" class="alignnone size-full wp-image-3583" srcset="https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao_form.png 515w, https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao_form-182x300.png 182w" sizes="(max-width: 515px) 100vw, 515px" /></p>
<p>Clique em concluir configurações e aguarde o Nextcloud fazer a instalação. </p>
<p>Ao concluir você a seguinte tela ira aparecer:<br />
<a href="https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao-1.png" data-rel="lightbox-gallery-XUU5hgGA" data-rl_title="" data-rl_caption="" title=""><img decoding="async" src="https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao-1-300x156.png" alt="" width="300" height="156" class="alignnone size-medium wp-image-3587" srcset="https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao-1-300x156.png 300w, https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao-1-768x400.png 768w, https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao-1-1024x533.png 1024w, https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao-1.png 1680w" sizes="(max-width: 300px) 100vw, 300px" /></a> <a href="https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao-1-1.png" data-rel="lightbox-gallery-XUU5hgGA" data-rl_title="" data-rl_caption="" title=""><img loading="lazy" decoding="async" src="https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao-1-1-300x156.png" alt="" width="300" height="156" class="alignnone size-medium wp-image-3588" srcset="https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao-1-1-300x156.png 300w, https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao-1-1-768x400.png 768w, https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao-1-1-1024x533.png 1024w, https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao-1-1.png 1680w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>Para não criar toda vez que adicionar um novo usuario esses arquivos padrões que para mim é só lixo, edite o config.php e adicione &#8216;skeletondirectory&#8217; => &#8221;, aproveitando já adicionamos os idiomas defaults e configuramos o mamcache. </p>
<pre class="remontti-code"># vim /var/www/cloud/config/config.php</pre>
<p>Adicione a baixo de &#8216;installed&#8217; => true,</p>
<pre class="remontti-code">  &#039;default_language&#039; =&gt; &#039;pt-BR&#039;,
  &#039;default_locale&#039; =&gt; &#039;pt_BR&#039;,
  &#039;skeletondirectory&#039; =&gt; &#039;&#039;,
  &#039;memcache.local&#039; =&gt; &#039;\\OC\\Memcache\\APCu&#039;,
  &#039;memcache.distributed&#039; =&gt; &#039;\\OC\\Memcache\\Redis&#039;,
  &#039;redis&#039; =&gt; 
  array (
    &#039;host&#039; =&gt; &#039;localhost&#039;,
    &#039;port&#039; =&gt; 6379,
  ),</pre>
<p>Ficando:</p>
<pre class="remontti-code">&lt;?php
$CONFIG = array (
  &#039;instanceid&#039; =&gt; &#039;xxxxxxxxxxxxxxxxxxxx&#039;,
  &#039;passwordsalt&#039; =&gt; &#039;xxxxxxxxxxxx+xxxxxxxxxxxxx&#039;,
  &#039;secret&#039; =&gt; &#039;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&#039;,
  &#039;trusted_domains&#039; =&gt; 
  array (
    0 =&gt; &#039;cloud.remontti.com.br&#039;,
  ),
  &#039;datadirectory&#039; =&gt; &#039;/var/www/cloud/data&#039;,
  &#039;dbtype&#039; =&gt; &#039;mysql&#039;,
  &#039;version&#039; =&gt; &#039;16.0.4.1&#039;,
  &#039;overwrite.cli.url&#039; =&gt; &#039;https://cloud.remontti.com.br&#039;,
  &#039;dbname&#039; =&gt; &#039;nextcloud&#039;,
  &#039;dbhost&#039; =&gt; &#039;localhost&#039;,
  &#039;dbport&#039; =&gt; &#039;&#039;,
  &#039;dbtableprefix&#039; =&gt; &#039;oc_&#039;,
  &#039;mysql.utf8mb4&#039; =&gt; true,
  &#039;dbuser&#039; =&gt; &#039;nextcloud&#039;,
  &#039;dbpassword&#039; =&gt; &#039;xxxxxxxxxxxxxxxxxxxx&#039;,
  &#039;installed&#039; =&gt; true,
  &#039;default_language&#039; =&gt; &#039;pt-BR&#039;,
  &#039;default_locale&#039; =&gt; &#039;pt_BR&#039;,
  &#039;skeletondirectory&#039; =&gt; &#039;&#039;,
  &#039;memcache.local&#039; =&gt; &#039;\\OC\\Memcache\\APCu&#039;,
  &#039;memcache.distributed&#039; =&gt; &#039;\\OC\\Memcache\\Redis&#039;,
  &#039;redis&#039; =&gt; 
  array (
    &#039;host&#039; =&gt; &#039;localhost&#039;,
    &#039;port&#039; =&gt; 6379,
  ),
);</pre>
<p>Acesse o menu de <strong>Configurações</strong> e em seguida o menu <strong>Visão Geral</strong> e certifique-se que está tudo ok!<br />
<a href="https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao_conf.png" data-rel="lightbox-gallery-XUU5hgGA" data-rl_title="" data-rl_caption="" title=""><img loading="lazy" decoding="async" src="https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao_conf-1024x607.png" alt="" width="1024" height="607" class="alignnone size-large wp-image-3595" srcset="https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao_conf-1024x607.png 1024w, https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao_conf-300x178.png 300w, https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao_conf-768x455.png 768w, https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao_conf.png 1680w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><br />
Faça um testes em:<br />
<a href="https://scan.nextcloud.com/" rel="noopener noreferrer" target="_blank">https://scan.nextcloud.com/</a><br />
<a href="https://tools.keycdn.com/http2-test" rel="noopener noreferrer" target="_blank">https://tools.keycdn.com/http2-test</a></p>
<p>Se desejar pode instalar as versões <a href="https://nextcloud.com/install/#install-clients" rel="noopener noreferrer" target="_blank"><strong>desktop ou mobile.</strong></a><br />
<a href="https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao_client.png" data-rel="lightbox-gallery-XUU5hgGA" data-rl_title="" data-rl_caption="" title=""><img loading="lazy" decoding="async" src="https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao_client-300x157.png" alt="" width="300" height="157" class="alignnone size-medium wp-image-3597" srcset="https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao_client-300x157.png 300w, https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao_client-768x403.png 768w, https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao_client-1024x538.png 1024w, https://blog.remontti.com.br/wp-content/uploads/2019/09/next_cloud_instalacao_client.png 1663w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>Outras melhorias que podem ser aplicadas.</p>
<pre class="remontti-code"># vim /etc/mysql/conf.d/mysql.cnf</pre>
<pre class="remontti-code">[mysqld]
innodb_buffer_pool_size=1G
innodb_io_capacity=4000</pre>
<pre class="remontti-code"># vim  /etc/php/7.3/fpm/conf.d/10-opcache.ini</pre>
<pre class="remontti-code">; configuration for php opcache module
; priority=10
zend_extension=opcache.so

opcache.enable=1
opcache.enable_cli=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=256
opcache.save_comments=1
opcache.revalidate_freq=1</pre>
<pre class="remontti-code"># systemctl restart php7.3-fpm apache2 </pre>
<p><a href="https://docs.nextcloud.com/server/15/admin_manual/configuration_server/caching_configuration.html" rel="noopener noreferrer" target="_blank">Caching Configuration</a></p>
<p><center><strong>Se quiser fazer uma doação para o café ficarei muito feliz pelo seu reconhecimento!</strong><br />
<a href="https://blog.remontti.com.br/doar"><img decoding="async" src="https://blog.remontti.com.br/wp-content/uploads/2019/07/quero-doar-remontti.png" /></a></center></p>
<p>Se não puder doar pode deixar seu agradecimento nos comentário também ficarei feliz em saber que ajudei. Se tiver qualquer pergunta deixe-a também. Se preferir entrar em Contato <a href="https://blog.remontti.com.br/meucontato" rel="noopener noreferrer" target="_blank">clique aqui.</a></p>
<p>Abraço!</p>
<p>Fonte: <a href="https://docs.nextcloud.com/server/16/admin_manual/installation/" rel="noopener noreferrer" target="_blank">https://docs.nextcloud.com/server/16/admin_manual/installation/</a></p>
<p>O post <a href="https://blog.remontti.com.br/3557">Instalação do Nextcloud + HTTP2 + HTTPS + Debian Buster &#8211; Seu próprio servidor de arquivos em nuvem!</a> apareceu primeiro em <a href="https://blog.remontti.com.br">Remontti</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.remontti.com.br/3557/feed</wfw:commentRss>
			<slash:comments>25</slash:comments>
		
		
			</item>
	</channel>
</rss>
