NGINX
SSL
Gerando um certificado no Linux
openssl req -x509 -nodes -newkey rsa:2048 -keyout cert.key -out cert.crt -days 365
Country Name (2 letter code) [AU]:BR State or Province Name (full name) [Some-State]:Sao Paulo Locality Name (eg, city) []:Morro Agudo Organization Name (eg, company) [Internet Widgits Pty Ltd]:Empresa Organizational Unit Name (eg, section) []: Common Name (e.g. server FQDN or YOUR name) []:exemplo.com Email Address []:root@exemplo.com
Dentro do arquivo nginx.conf
server {
listen 443 ssl;
server_name localhost;
ssl_certificate /usr/local/nginx/ssl/cert.crt;
ssl_certificate_key /usr/local/nginx/ssl/cert.key;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
...
}
Proxy Reverso
Crie um arquivo .conf para o proxy, dentro de /etc/nginx/conf.d
server {
listen 80;
server_name http://127.0.0.1 ;
location / {
proxy_pass http://127.0.0.1:8080 ;
}
}
Se necessário, incluir a linha include:
/etc/nginx/conf.d/*;
antes da ultima "}" (chave)
https://www.organicadigital.com/blog/configurando-ssl-com-nginx/
Comentários
Postar um comentário