Skip to content

Instantly share code, notes, and snippets.

@thianlopezz
Last active August 27, 2018 23:56
Show Gist options
  • Save thianlopezz/54ef56c2656ad09e7c759e5a45d22646 to your computer and use it in GitHub Desktop.
Save thianlopezz/54ef56c2656ad09e7c759e5a45d22646 to your computer and use it in GitHub Desktop.
http {
# OTRAS CONFIGURACIONES
#...
# CONFIGURAMOS NUESTRO PUERTO 443 PUERTO SEGURO
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
server_name _;
root /usr/share/nginx/html;
#Ruta donde tenemos nuestro archivo .crt o .pem
ssl_certificate "/home/ubuntu/apps/cert-quentify/certificate.crt";
ssl_certificate_key "/home/ubuntu/apps/cert-quentify/key.key";
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:SEED:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!RSAPSK:!aDH:!aECDH:!EDH-DSS-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!SRP;
ssl_prefer_server_ciphers on;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
# CONFIGURAMOS LOCALHOST PUERTO 5002
# DONDE NUESTRA APLICACION ESTA ESCUCHANDO
location / {
proxy_pass http://127.0.0.1:5002;
}
# CONFIGURACION DE PAGINAS DE ERRORES
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
# CONFIGURAMOS PARA QUE TODOS LAS PETICIONES QUE LLEGAN
# AL PUERTO 80 SE REDIRIJAN AL PROTOCOLO HTTPS
# CONFIGURAMOS DOMINIO
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 301 https://www.quentify.com;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment