<?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 https - Remontti</title>
	<atom:link href="https://blog.remontti.com.br/tag/https/feed" rel="self" type="application/rss+xml" />
	<link>https://blog.remontti.com.br/tag/https</link>
	<description>rudimar@remontti</description>
	<lastBuildDate>Wed, 11 Oct 2023 17:31:42 +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 https - Remontti</title>
	<link>https://blog.remontti.com.br/tag/https</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Guia Passo a Passo para Instalar o Typebot em seu servidor próprio</title>
		<link>https://blog.remontti.com.br/7656</link>
					<comments>https://blog.remontti.com.br/7656#comments</comments>
		
		<dc:creator><![CDATA[Rudimar Remontti]]></dc:creator>
		<pubDate>Fri, 22 Sep 2023 15:32:29 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutoriais]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[automação]]></category>
		<category><![CDATA[banco de dados]]></category>
		<category><![CDATA[bookworm]]></category>
		<category><![CDATA[Certbot]]></category>
		<category><![CDATA[Chatbot]]></category>
		<category><![CDATA[Configuração]]></category>
		<category><![CDATA[Debian 12]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[instalaçao]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[Node.js]]></category>
		<category><![CDATA[passo a passo]]></category>
		<category><![CDATA[PM2]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[Prisma]]></category>
		<category><![CDATA[Segurança]]></category>
		<category><![CDATA[Servidor]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Typebot]]></category>
		<guid isPermaLink="false">https://blog.remontti.com.br/?p=7656</guid>

					<description><![CDATA[<p>O Typebot é uma ferramenta de código aberto que permite criar aplicativos ou formulários conversacionais de forma simples e eficaz. Ele oferece uma alternativa robusta a outras plataformas como o Landbot. Com o Typebot,&#46;&#46;&#46;</p>
<p>O post <a href="https://blog.remontti.com.br/7656">Guia Passo a Passo para Instalar o Typebot em seu servidor próprio</a> apareceu primeiro em <a href="https://blog.remontti.com.br">Remontti</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img fetchpriority="high" decoding="async" src="https://blog.remontti.com.br/wp-content/uploads/2023/09/typebot.jpeg" alt="" width="1024" height="640" class="alignnone size-full wp-image-7666" srcset="https://blog.remontti.com.br/wp-content/uploads/2023/09/typebot.jpeg 1024w, https://blog.remontti.com.br/wp-content/uploads/2023/09/typebot-300x188.jpeg 300w, https://blog.remontti.com.br/wp-content/uploads/2023/09/typebot-768x480.jpeg 768w" sizes="(max-width: 1024px) 100vw, 1024px" /></p>
<p>O <a href="https://typebot.io" rel="noopener" target="_blank"><strong>Typebot</strong></a> é uma ferramenta de código aberto que permite criar aplicativos ou formulários conversacionais de forma simples e eficaz. Ele oferece uma alternativa robusta a outras plataformas como o Landbot. Com o Typebot, você pode criar diferentes tipos de aplicativos conversacionais, como:</p>
<p>&#8211; Qualificação de leads<br />
&#8211; Lançamento de produtos<br />
&#8211; Integração de usuários<br />
&#8211; Suporte ao cliente</p>
<p>O Typebot é amado por equipes e criadores em todo o mundo e oferece uma experiência de construção fácil. Você pode arrastar e soltar blocos para criar seu aplicativo e integrá-lo facilmente em qualquer plataforma. Além disso, ele permite coletar resultados em tempo real, o que é uma grande vantagem.</p>
<p><img decoding="async" src="https://blog.remontti.com.br/wp-content/uploads/2023/09/builder-screenshot-scaled.webp" alt="" width="2560" height="1465" class="alignnone size-full wp-image-7664" srcset="https://blog.remontti.com.br/wp-content/uploads/2023/09/builder-screenshot-scaled.webp 2560w, https://blog.remontti.com.br/wp-content/uploads/2023/09/builder-screenshot-300x172.webp 300w, https://blog.remontti.com.br/wp-content/uploads/2023/09/builder-screenshot-1024x586.webp 1024w, https://blog.remontti.com.br/wp-content/uploads/2023/09/builder-screenshot-768x439.webp 768w, https://blog.remontti.com.br/wp-content/uploads/2023/09/builder-screenshot-1536x879.webp 1536w, https://blog.remontti.com.br/wp-content/uploads/2023/09/builder-screenshot-2048x1172.webp 2048w" sizes="(max-width: 2560px) 100vw, 2560px" /></p>
<h4>Exemplos de Uso</h4>
<p><strong>&#8211; Coleta de Informações de Contato:</strong> Substitua seus formulários tradicionais por um chatbot que pode coletar nomes, e-mails e outros detalhes de forma interativa.<br />
<strong>&#8211; Suporte ao Cliente:</strong> Use o Typebot para responder automaticamente a perguntas frequentes e fornecer suporte em tempo real.<br />
<strong>&#8211; Integração de Usuários:</strong> Facilite o processo de integração, fornecendo aos novos usuários um guia passo a passo interativo.<br />
&#8211; Campanhas de Marketing: Utilize o Typebot em suas landing pages para aumentar as taxas de conversão e engajamento.<br />
<strong>&#8211; Pesquisas e Feedback:</strong> Colete feedback do usuário ou conduza pesquisas de forma mais envolvente e interativa.</p>
<h4>Requesitos</h4>
<p><a href="https://blog.remontti.com.br/7236" rel="noopener" target="_blank">Debian 12 bookworm (Instalação Limpa)</a></p>
<h4>DNS</h4>
<p>Crie duas entradas em seu DNS exemplo:<br />
&#8211; typebot.remontti.cum.br apontando para os IPs do servidor<br />
&#8211; typebotapi.remontti.cum.br apontando para os IPs do servidor</p>
<p>Se você<a href="https://blog.remontti.com.br/5958" rel="noopener" target="_blank"> já é da turma do blog</a> vai entender o que temos a baixo la no amigo bind9:</p>
<pre class="remontti-code-plain">typebot       A       192.168.0.100
              AAAA    2001:db8:bebe:cafe::100

typebotapi    A       192.168.0.100
              AAAA    2001:db8:bebe:cafe::100</pre>
<h4>Atualização e Instalação de Pacotes</h4>
<pre class="remontti-code"># apt update; apt upgrade -y</pre>
<p>Instale os pacotes necessários para o projeto</p>
<pre class="remontti-code"># apt install -y nodejs npm git nginx postgresql postgresql-contrib</pre>
<p>Instala globalmente os pacotes pm2 e pnpm usando npm</p>
<pre class="remontti-code"># npm install -g pm2 pnpm</pre>
<h4>Configuração do PostgreSQL</h4>
<p>Alterne para o usuário postgres</p>
<pre class="remontti-code"># su - postgres</pre>
<p>Crie um novo usuário chamado &#8216;typebot&#8217; em seguida inserira uma senha.</p>
<pre class="remontti-code">$ createuser --pwprompt typebot</pre>
<p>Crie um novo banco de dados &#8216;typebot&#8217; e define &#8216;typebot&#8217; como o proprietário</p>
<pre class="remontti-code">$ createdb -O typebot typebot</pre>
<p>Sai do usuário postgres</p>
<pre class="remontti-code">$ exit</pre>
<h4>Preparando formas de autenticação</h4>
<p>Vou deixar 3 formas que são as mais fáceis, você pode optar em usar apenas uma.</p>
<h4>Email</h4>
<p>A mais fácil de todas, basta você utilizar um email, assim toda vez que você for logar ele ira lhe mandar um e-mail com o link. </p>
<h4>Google</h4>
<p>Crie um novo projeto em <a href="https://console.developers.google.com/apis/credentials" rel="noopener" target="_blank">https://console.developers.google.com/apis/credentials</a></p>
<pre class="remontti-code-plain">
Cria um novo projeto
&gt; OAuth consent screen
	&gt; externo 
	Nome: Typebot
	User support email: seu!
	Developer contact information: seu!
	 SAVE

	 ADD OR REMOVE SCOPES
	   	.../auth/userinfo.email
	   	.../auth/userinfo.profile
	   	 SAVE

	   	 SAVE

	   	 BACK TO DASH
&gt; Credentials 
	+ CREATE CREDENTALS
	  &gt; Create OAuth client ID 
		Application type: Web application
		Name: Typebot

		Authorized redirect URIs
		https://typebot.remontti.cum.br/api/auth/callback/google

	Client ID
	Anote

	Client secret
	Anote</pre>
<p>Será usado em:</p>
<pre class="remontti-code-plain">GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=</pre>
<h4>Github</h4>
<p>Acesse <a href="https://github.com/settings/developers" rel="noopener" target="_blank">https://github.com/settings/developers</a> e clique em <strong>New OAuth Apps</strong></p>
<pre class="remontti-code-plain">Application name: Typebot
Homepage URL: https://typebot.remontti.cum.br
Application description: Typebot Auth
Authorization callback URL: https://typebot.remontti.cum.br/api/auth/callback/github</pre>
<p>Anote o <strong>Client ID</strong> e clique em <strong>Generate a new client secret</strong> anote os dois para ser usado em </p>
<pre class="remontti-code-plain">GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=</pre>
<h4>Configuração do Projeto Typebot no Servidor</h4>
<p>Vamos armazenar o projeto mo diretório /opt. </p>
<pre class="remontti-code"># cd /opt/
# git clone https://github.com/baptisteArno/typebot.io.git</pre>
<p>Entre no diretório do projeto<br />
cd typebot.io</p>
<p>Crie arquivo <strong>.env</strong> onde irá ficar as <a href="https://docs.typebot.io/self-hosting/configuration" rel="noopener" target="_blank">variáveis de ambiente</a>.</p>
<pre class="remontti-code"># vim /opt/typebot.io/.env</pre>
<p>Faça os ajustes:</p>
<pre class="remontti-code-plain"># Define a chave de criptografia (Gere aqui https://senhasegura.remontti.cum.br/)
ENCRYPTION_SECRET=i9eRecwVJQeKENqdcrQeizOXFHzQdwAp

# Define a URL de conexão com o banco de dados PostgreSQL
DATABASE_URL=postgresql://typebot:minhasupersenha@localhost:5432/typebot

# Define as URLs para autenticação e API
NEXTAUTH_URL=https://typebot.remontti.cum.br
NEXT_PUBLIC_VIEWER_URL=https://typebotapi.remontti.cum.br

# Define o e-mail do administrador
ADMIN_EMAIL=typebot@remontti.cum.br

# Define as configurações para o servidor SMTP
SMTP_USERNAME=typebot@remontti.cum.br
SMTP_PASSWORD=minhasenha
SMTP_HOST=mail.remontti.cum.br
SMTP_PORT=25
NEXT_PUBLIC_SMTP_FROM=typebot@remontti.cum.br
SMTP_SECURE=false
SMTP_AUTH_DISABLED=false

# Configurações para autenticação via Google e GitHub (opcional)
# Google
GOOGLE_CLIENT_ID=98916e5d5dd1-e3lfmixxuditlz2egexp0n8bfwf3oie3.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=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

# GitHub
GITHUB_CLIENT_ID=6ewyvfeumndg2ve5kve1
GITHUB_CLIENT_SECRET=7r78f2vpmihgriebkp7p4b0ervd4qc7ufu1uu5nx

# Permite ou desabilita o cadastro de novas contas
DISABLE_SIGNUP=false</pre>
<p>Instale todas as dependências do projeto</p>
<pre class="remontti-code"># cd /opt/typebot.io/
# pnpm install</pre>
<p>Saída:</p>
<pre class="remontti-code-plain">Scope: all 19 workspace projects
Lockfile is up to date, resolution step is skipped
Packages: +2398
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Downloading registry.npmjs.org/next/13.4.3: 12,32 MB/12,32 MB, done
[...]
[...]
[...]
devDependencies:
+ cross-env 7.0.3
+ cz-emoji 1.3.2-canary.2
+ husky 8.0.3
+ prettier 2.8.8
+ turbo 1.10.12

. prepare$ husky install
│ husky - Git hooks installed
└─ Done in 288ms
Done in 2m 12.5s</pre>
<p>Compile os aplicativos</p>
<pre class="remontti-code"># cd /opt/typebot.io/
# pnpm run build:apps</pre>
<p>Saída</p>
<pre class="remontti-code-plain">&gt; typebot-os@2.17.2 build:apps /root/typebot.io
&gt; turbo run build --filter=builder... --filter=viewer...
[...]
[...]
[...]
[...]
builder:build: ○  (Static)  automatically rendered as static HTML (uses no initial props)
builder:build: 

 Tasks:    9 successful, 9 total
Cached:    0 cached, 9 total
  Time:    5m28.928s 

⠋ ...writing to cache...  [1s] 

─────────┴──────────┴──────────┘</pre>
<p>Copie o arquivo .env para os diretórios dos aplicativos</p>
<pre class="remontti-code"># cp /opt/typebot.io/.env /opt/typebot.io/apps/builder/
# cp /opt/typebot.io/.env /opt/typebot.io/apps/viewer/</pre>
<p>Configuração e migrações do banco de dados</p>
<pre class="remontti-code"># cd /opt/typebot.io/
# pnpm prisma generate &amp;&amp; pnpm db:migrate</pre>
<p>Saída:</p>
<pre class="remontti-code-plain">Environment variables loaded from .env
prisma:warn We could not find your Prisma schema at `prisma/schema.prisma`.
If you have a Prisma schema file in a custom path, you will need to run
`prisma generate --schema=./path/to/your/schema.prisma` to generate Prisma Client.
If you do not have a Prisma schema file yet, you can ignore this message.


&gt; typebot-os@2.17.2 db:migrate /opt/typebot.io
&gt; cd packages/prisma &amp;&amp; pnpm run db:migrate


&gt; @typebot.io/prisma@0.1.0 db:migrate /opt/typebot.io/packages/prisma
&gt; pnpm migrate:deploy


&gt; @typebot.io/prisma@0.1.0 migrate:deploy /opt/typebot.io/packages/prisma
&gt; dotenv -e ./.env -e ../../.env -- tsx scripts/migrate-deploy.ts

Executing for PostgreSQL schema
┌─────────────────────────────────────────────────────────┐
│  Update available 5.0.0 -&gt; 5.3.1                        │
│  Run the following to update                            │
│    npm i --save-dev prisma@latest                       │
│    npm i @prisma/client@latest                          │
└─────────────────────────────────────────────────────────┘</pre>
<p>Inicia os aplicativos com o PM2</p>
<pre class="remontti-code"># pm2 start --name=typebotwww --cwd /opt/typebot.io/apps/builder/ &quot;pnpm -- next start -p 54001&quot;
# pm2 start --name=typebotapi --cwd /opt/typebot.io/apps/viewer/ &quot;pnpm -- next start -p 54002&quot;</pre>
<pre class="remontti-code-plain">┌────┬───────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name          │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
├────┼───────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 1  │ typebotapi    │ default     │ N/A     │ fork    │ 819      │ 0s     │ 0    │ online    │ 0%       │ 10.8mb   │ root     │ disabled │
│ 0  │ typebotwww    │ default     │ N/A     │ fork    │ 760      │ 19s    │ 0    │ online    │ 0%       │ 97.2mb   │ root     │ disabled │
└────┴───────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘</pre>
<p>Salva a configuração atual do PM2 e configura para iniciar com o sistema</p>
<pre class="remontti-code"># pm2 save
# pm2 startup</pre>
<h5>Configuração do Nginx</h5>
<p>Cria os arquivos de configuração do Nginx para os subdomínios</p>
<pre class="remontti-code"># vim /etc/nginx/sites-available/typebot.remontti.cum.br.conf</pre>
<pre class="remontti-code-plain">
server {
    listen 80;
    listen [::]:80;
 
    server_name typebot.remontti.cum.br;

    location / {
        proxy_pass http://localhost:54001;
        proxy_set_header Host $host;
    }
}

</pre>
<pre class="remontti-code"># vim /etc/nginx/sites-available/typebotapi.remontti.cum.br.conf</pre>
<pre class="remontti-code-plain">
server {
    listen 80;
    listen [::]:80;
 
    server_name typebotapi.remontti.cum.br;
 
    location / {
        proxy_pass http://localhost:54002;
        proxy_set_header Host $host;
    }
}
</pre>
<p>Ativa os sites no Nginx</p>
<pre class="remontti-code"># ln -s /etc/nginx/sites-available/typebot.remontti.cum.br.conf /etc/nginx/sites-enabled/
# ln -s /etc/nginx/sites-available/typebotapi.remontti.cum.br.conf /etc/nginx/sites-enabled/
# rm /etc/nginx/sites-enabled/default</pre>
<p>Verifica a sintaxe e reinicia o Nginx</p>
<pre class="remontti-code"># nginx -t
# systemctl restart nginx</pre>
<h5>Configuração do Certbot/Let&#8217;s Encrypt para HTTPS</h5>
<p>Instala o Certbot e o plugin do Nginx</p>
<pre class="remontti-code"># apt install certbot python3-certbot-nginx</pre>
<p>Executa o Certbot para obter os certificados SSL</p>
<pre class="remontti-code">certbot</pre>
<p>Responda: </p>
<pre class="remontti-code-plain">Saving debug log to /var/log/letsencrypt/letsencrypt.log
Enter email address (used for urgent renewal and security notices)
 (Enter &#039;c&#039; to cancel): noc@remontti.cum.br

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.3-September-21-2022.pdf. You must
agree in order to register with the ACME server. Do you agree?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y &lt;&lt;&lt;&lt;&lt;

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing, once your first certificate is successfully issued, 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 &lt;&lt;&lt;&lt;
Account registered.

Which names would you like to activate HTTPS for?
We recommend selecting either all domains, or all domains in a VirtualHost/server block.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: typebotapi.remontti.cum.br
2: typebot.remontti.cum.br
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter &#039;c&#039; to cancel):  &lt;&lt;&lt;&lt;
Requesting a certificate for typebotapi.remontti.cum.br and typebot.remontti.cum.br

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/typebotapi.remontti.cum.br/fullchain.pem
Key is saved at:         /etc/letsencrypt/live/typebotapi.remontti.cum.br/privkey.pem
This certificate expires on 2023-12-20.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.

Deploying certificate
Successfully deployed certificate for typebotapi.remontti.cum.br to /etc/nginx/sites-enabled/typebotapi.remontti.cum.br.conf
Successfully deployed certificate for typebot.remontti.cum.br to /etc/nginx/sites-enabled/typebot.remontti.cum.br.conf
Congratulations! You have successfully enabled HTTPS on https://typebotapi.remontti.cum.br and https://typebot.remontti.cum.br

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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>
<h5>Configuração do Cron para Renovação Automática do Certificado SSL.</h5>
<p>Adicione uma tarefa cron para renovar automaticamente o certificado SSL todo dia 1 de cada mês à meia-noite, e reinicie o cron.</p>
<pre class="remontti-code"># echo &#039;00 00   1 * *   root    /usr/bin/certbot renew -q&#039; &gt;&gt; /etc/crontab
# systemctl restart cron.service</pre>
<h5>Acessando a aplicação</h5>
<p>Abra seu navegador e acesse: https://typebot.remontti.cum.br<br />
<img decoding="async" src="https://blog.remontti.cum.br/wp-content/uploads/2023/09/typebot-remontti.png" alt="" width="900" height="403" class="alignnone size-full wp-image-7661" srcset="https://blog.remontti.com.br/wp-content/uploads/2023/09/typebot-remontti.png 900w, https://blog.remontti.com.br/wp-content/uploads/2023/09/typebot-remontti-300x134.png 300w, https://blog.remontti.com.br/wp-content/uploads/2023/09/typebot-remontti-768x344.png 768w" sizes="(max-width: 900px) 100vw, 900px" /></p>
<p>Clique em <strong>Registre-se gratuitamente</strong><br />
Escolha a forma desejada.</p>
<h4><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2757.png" alt="❗" class="wp-smiley" style="height: 1em; max-height: 1em;" /><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2757.png" alt="❗" class="wp-smiley" style="height: 1em; max-height: 1em;" /><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2757.png" alt="❗" class="wp-smiley" style="height: 1em; max-height: 1em;" /> </h4>
<p>Os registros <strong>ficam aberto</strong>, então registre toda sua equipe e em seguida desativa a possibilidade de novos registros nos arquivos .env (<strong>DISABLE_SIGNUP=true</strong>)<br />
Com o comando sed</p>
<pre class="remontti-code"># sed -i &#039;s/DISABLE_SIGNUP=false/DISABLE_SIGNUP=true/&#039; /opt/typebot.io/.env
# sed -i &#039;s/DISABLE_SIGNUP=false/DISABLE_SIGNUP=true/&#039; /opt/typebot.io/apps/viewer/.env
# sed -i &#039;s/DISABLE_SIGNUP=false/DISABLE_SIGNUP=true/&#039; /opt/typebot.io/apps/builder/.env</pre>
<p>Reinicie o pm2 </p>
<pre class="remontti-code"># systemctl restart pm2-root.service</pre>
<p>Se deseja realizar novos cadastros basta alterar <strong>DISABLE_SIGNUP=true</strong> para <strong>DISABLE_SIGNUP=false</strong> e reiniciar novamente.</p>
<pre class="remontti-code"># sed -i &#039;s/DISABLE_SIGNUP=true/DISABLE_SIGNUP=false/&#039; /opt/typebot.io/.env
# sed -i &#039;s/DISABLE_SIGNUP=true/DISABLE_SIGNUP=false/&#039; /opt/typebot.io/apps/viewer/.env
# sed -i &#039;s/DISABLE_SIGNUP=true/DISABLE_SIGNUP=false/&#039; /opt/typebot.io/apps/builder/.env</pre>
<p>Reinicie o pm2 </p>
<pre class="remontti-code"># systemctl restart pm2-root.service</pre>
<p>Se desejar fazer alterações faça os arquivos:</p>
<pre class="remontti-code-plain">/opt/typebot.io/.env
/opt/typebot.io/apps/viewer/.env
/opt/typebot.io/apps/builder/.env</pre>
<p><img loading="lazy" decoding="async" src="https://blog.remontti.cum.br/wp-content/uploads/2023/09/typebot-remontti-1.png" alt="" width="1050" height="411" class="alignnone size-full wp-image-7662" srcset="https://blog.remontti.com.br/wp-content/uploads/2023/09/typebot-remontti-1.png 1050w, https://blog.remontti.com.br/wp-content/uploads/2023/09/typebot-remontti-1-300x117.png 300w, https://blog.remontti.com.br/wp-content/uploads/2023/09/typebot-remontti-1-1024x401.png 1024w, https://blog.remontti.com.br/wp-content/uploads/2023/09/typebot-remontti-1-768x301.png 768w" sizes="auto, (max-width: 1050px) 100vw, 1050px" /></p>
<p>A parte mais complicada está feita!<br />
Existe vários videos no <a href="https://www.youtube.com/results?search_query=typebot" rel="noopener" target="_blank">YouTube</a> sobre como mexer nessa criança. Inclusive no <a href="https://www.youtube.com/@typebot4666" rel="noopener" target="_blank">canal oficial </a>dos desenvolvedores. <em>Dica ative a legenda e selecione traduzir!</em></p>
<p><iframe loading="lazy" width="560" height="315" src="https://www.youtube.com/embed/jp3ggg_42-M?si=xPi09hAm6AqyZfcU" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe></p>
<p>Gostou e quer me ajudar manter o blog sem a inconveniência de anúncios intrusivos ou a imposição de taxas? <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p><strong>Se quiser fazer uma doação para o café ficarei muito feliz pelo seu reconhecimento!</strong><br />
<a href="https://blog.remontti.cum.br/doar"><img decoding="async" src="https://blog.remontti.com.br/wp-content/uploads/2019/07/quero-doar-remontti.png" /></a></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.cum.br/meucontato" rel="noopener noreferrer" target="_blank">clique aqui.</a></p>
<p>Abraço!</p>
<p><strong>Fonte:</strong><br />
<a href="https://docs.typebot.io/" rel="noopener" target="_blank">https://docs.typebot.io/</a></p>
<p>O post <a href="https://blog.remontti.com.br/7656">Guia Passo a Passo para Instalar o Typebot em seu servidor próprio</a> apareceu primeiro em <a href="https://blog.remontti.com.br">Remontti</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.remontti.com.br/7656/feed</wfw:commentRss>
			<slash:comments>17</slash:comments>
		
		
			</item>
		<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 loading="lazy" 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="auto, (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 loading="lazy" 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="auto, (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-JY8CkeKF" 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-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="auto, (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-JY8CkeKF" 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-JY8CkeKF" 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-JY8CkeKF" 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>
		<item>
		<title>Configurando certificado grátis no Apache2 &#8211; Debian 8/9</title>
		<link>https://blog.remontti.com.br/1832</link>
					<comments>https://blog.remontti.com.br/1832#comments</comments>
		
		<dc:creator><![CDATA[Rudimar Remontti]]></dc:creator>
		<pubDate>Thu, 27 Apr 2017 14:29:04 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutoriais]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[certificado]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[letsencrypt]]></category>
		<guid isPermaLink="false">http://blog.remontti.com.br/?p=1832</guid>

					<description><![CDATA[<p>Distribuição utilizada: Debian 8 Jessie &#038; / Debian 9 Stretch &#8211; Instalação Limpa Versão Apache: 2.4.10 > Para obter um certificado grátis vamos usar o Let’s Encrypt CA. Let&#8217;s Encrypt entrega certificados digitais que permite&#46;&#46;&#46;</p>
<p>O post <a href="https://blog.remontti.com.br/1832">Configurando certificado grátis no Apache2 &#8211; Debian 8/9</a> apareceu primeiro em <a href="https://blog.remontti.com.br">Remontti</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" src="https://blog.remontti.com.br/wp-content/uploads/2017/04/https-blog-remontti-300x142.png" alt="" width="300" height="142" class="alignnone size-medium wp-image-1838" srcset="https://blog.remontti.com.br/wp-content/uploads/2017/04/https-blog-remontti-300x142.png 300w, https://blog.remontti.com.br/wp-content/uploads/2017/04/https-blog-remontti-520x245.png 520w, https://blog.remontti.com.br/wp-content/uploads/2017/04/https-blog-remontti.png 720w" sizes="auto, (max-width: 300px) 100vw, 300px" /></p>
<p>Distribuição utilizada: Debian 8 Jessie &#038; / Debian 9 Stretch &#8211; <a href="https://blog.remontti.com.br/1152">Instalação Limpa</a><br />
Versão <a href="https://blog.remontti.com.br/1296" target="_blank" rel="noopener noreferrer">Apache</a>: 2.4.10 ></p>
<p>Para obter um <strong>certificado grátis</strong> vamos usar o Let’s Encrypt CA.</p>
<p>Let&#8217;s Encrypt entrega certificados digitais que permite HTTPS (SSL/TLS) para sites gratuitamente, de maneira fácil. É um serviço fornecido pelo <a href="https://letsencrypt.org/isrg/" target="_blank" rel="noopener noreferrer">Internet Security Research Group</a> (ISRG).</p>
<p>Seus principais princípios por trás de Let&#8217;s Encrypt são:</p>
<p><i><strong>Grátis</strong>: Qualquer pessoa que possua um nome de domínio pode usar Let&#8217;s Encrypt para obter um certificado confiável a custo zero.<br />
<strong>Automático</strong>: o software em execução em um servidor web pode interagir com o Let&#8217;s Encrypt para obter um certificado sem dor, configurá-lo com segurança para uso e cuidar automaticamente da renovação.<br />
<strong>Seguro</strong>: Let&#8217;s Encrypt servirá como uma plataforma para avançar as melhores práticas de segurança TLS, tanto no lado da CA quanto ao ajudar os operadores do site a proteger adequadamente seus servidores.<br />
<strong>Transparente</strong>: Todos os certificados emitidos ou revogados serão publicamente registrados e disponíveis para qualquer pessoa a inspecionar.<br />
<strong>Aberto</strong>: O protocolo automático de emissão e renovação será publicado como um padrão aberto que outros podem adotar.<br />
<strong>Cooperativo</strong>: Assim como os próprios protocolos de Internet subjacentes, Let&#8217;s Encrypt é um esforço conjunto para beneficiar a comunidade, além do controle de qualquer organização.</i></p>
<p>Let&#8217;s Encrypt apresentado, vamos instalar o cliente certbot/letsnecrypt. </p>
<p>No <strong>Debian 8</strong> será necessário ativar o repositório <a href="http://backports.debian.org/Instructions/" target="_blank" rel="noopener noreferrer">backports</a>.</p>
<pre class="remontti-code"># echo &#039;deb http://ftp.debian.org/debian jessie-backports main&#039; &gt;&gt; /etc/apt/sources.list.d/backports.list
# apt update
# apt upgrade
# apt install letsencrypt python-certbot-apache -t jessie-backports</pre>
<p>No <strong>Debian 9</strong></p>
<pre class="remontti-code"># apt update
# apt upgrade
# apt install letsencrypt python-certbot-apache</pre>
<p>Tenha configurado um/ou mais domínio(s) em seu apache. Vou deixar aqui um exemplo de configuração:</p>
<pre class="remontti-code">&lt;VirtualHost *:80&gt;
        ServerName meuhttps.remontti.com.br
        ServerAdmin seu@email.com.br
 
        DocumentRoot /var/www/html

        &lt;Directory /var/www/html/&gt;
                Options FollowSymLinks
                AllowOverride All
        &lt;/Directory&gt; 

        LogLevel warn
 
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
&lt;/VirtualHost&gt;</pre>
<p>Vamos a autoconfiguração.</p>
<pre class="remontti-code"># letsencrypt --apache --agree-tos --email seu@email.com -d meuhttps.remontti.com.br</pre>
<p>Se tiver algum erro tente:</p>
<pre class="remontti-code"># apache2ctl stop
# letsencrypt --authenticator standalone --installer apache -d meuhttps.remontti.com.br</pre>
<p><a title="" href="https://blog.remontti.com.br/wp-content/uploads/2017/01/Screenshot_20170113_160617.png" data-rel="lightbox-gallery-bGlnaHRib3gtMw==" data-rl_title="" data-rl_caption=""><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-1563" src="https://blog.remontti.com.br/wp-content/uploads/2017/01/Screenshot_20170113_160617-300x167.png" sizes="auto, (max-width: 300px) 100vw, 300px" srcset="https://blog.remontti.com.br/wp-content/uploads/2017/01/Screenshot_20170113_160617-300x167.png 300w, https://blog.remontti.com.br/wp-content/uploads/2017/01/Screenshot_20170113_160617.png 643w" alt="" width="300" height="167" /></a></p>
<p><a href="https://blog.remontti.com.br/wp-content/uploads/2017/04/Screenshot_20170619_155108.png" data-rel="lightbox-gallery-8VJXiq3b" data-rl_title="" data-rl_caption="" title=""><img loading="lazy" decoding="async" src="https://blog.remontti.com.br/wp-content/uploads/2017/04/Screenshot_20170619_155108-300x200.png" alt="" width="300" height="200" class="alignnone size-medium wp-image-2049" srcset="https://blog.remontti.com.br/wp-content/uploads/2017/04/Screenshot_20170619_155108-300x200.png 300w, https://blog.remontti.com.br/wp-content/uploads/2017/04/Screenshot_20170619_155108-768x512.png 768w, https://blog.remontti.com.br/wp-content/uploads/2017/04/Screenshot_20170619_155108-1024x683.png 1024w, https://blog.remontti.com.br/wp-content/uploads/2017/04/Screenshot_20170619_155108.png 1140w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p><strong>Atualizando</strong></p>
<p>Para atualizar os certificados de seus domínio você pode usar o comando:</p>
<pre class="remontti-code"># certbot renew --dry-run</pre>
<p>Dica, se desejar desativar o TLS1.0 e TLS1.1 após criar um certificado um arquivo é criado /etc/letsencrypt/options-ssl-apache.conf, então edite e inclua no SSLProtocol TLSv1 -TLSv1.1</p>
<pre class="remontti-code"># vim /etc/letsencrypt/options-ssl-apache.conf</pre>
<p>Ficando</p>
<pre class="remontti-code">#SSLProtocol            all -SSLv2 -SSLv3
SSLProtocol             all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1</pre>
<p>Reinicie o Apache:</p>
<pre class="remontti-code"># systemctl restart apache2</pre>
<p>Para testar acesse: <a href="https://www.cdn77.com/tls-test/" rel="noopener" target="_blank">https://www.cdn77.com/tls-test/</a><br />
<a href="https://blog.remontti.com.br/wp-content/uploads/2021/10/tls_teste.png" data-rel="lightbox-gallery-8VJXiq3b" data-rl_title="" data-rl_caption="" title=""><img loading="lazy" decoding="async" src="https://blog.remontti.com.br/wp-content/uploads/2021/10/tls_teste-300x182.png" alt="" width="300" height="182" class="alignnone size-medium wp-image-6158" srcset="https://blog.remontti.com.br/wp-content/uploads/2021/10/tls_teste-300x182.png 300w, https://blog.remontti.com.br/wp-content/uploads/2021/10/tls_teste-1024x620.png 1024w, https://blog.remontti.com.br/wp-content/uploads/2021/10/tls_teste-768x465.png 768w, https://blog.remontti.com.br/wp-content/uploads/2021/10/tls_teste.png 1099w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>Fonte:<br />
<a href="https://certbot.eff.org/#debianjessie-apache" target="_blank" rel="noopener noreferrer">https://certbot.eff.org/#debianjessie-apache</a><br />
<a href="https://certbot.eff.org/about/" target="_blank" rel="noopener noreferrer">https://certbot.eff.org/about/</a></em></p>
<p>O post <a href="https://blog.remontti.com.br/1832">Configurando certificado grátis no Apache2 &#8211; Debian 8/9</a> apareceu primeiro em <a href="https://blog.remontti.com.br">Remontti</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.remontti.com.br/1832/feed</wfw:commentRss>
			<slash:comments>10</slash:comments>
		
		
			</item>
	</channel>
</rss>
