## myapp backend ##
upstream myapp {
server 127.0.0.1:8069;
}
## https site##
server {
listen 443 default;
server_name myapp.xyz;
root /usr/share/nginx/html;
index index.html index.htm;
# log files
access_log /var/log/nginx/myapp.access.log;
error_log /var/log/nginx/myapp.error.log;
# ssl files
ssl on;
ssl_certificate /etc/nginx/ssl/myapp_xyz.chained.crt;
ssl_certificate_key /etc/nginx/ssl/myapp_xyz.key;
keepalive_timeout 60;
# limit ciphers
ssl_ciphers HIGH:!ADH:!MD5;
ssl_protocols SSLv3 TLSv1;
ssl_prefer_server_ciphers on;
# proxy buffers
proxy_buffers 16 64k;
proxy_buffer_size 128k;
## default location ##
location / {
proxy_pass http://myapp;
# force timeouts if the backend dies
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
# set headers
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
# cache some static data in memory for 60mins
location ~* /web/static/ {
proxy_cache_valid 200 60m;
proxy_buffering on;
expires 864000;
proxy_pass http://myapp;
}
}
## http redirects to https ##
server {
listen 80;
server_name myapp.xyz;
# Strict Transport Security
add_header Strict-Transport-Security max-age=2592000;
rewrite ^/.*$ https://$host$request_uri? permanent;
}
é o meu arquivo de configuração ssl nginx, parece tudo normal, mas lode sitenot ficando servidor de erro não encontrado e arquivos de log estão vazios.
enquanto eu estou correndo nginx -t
tudo ok, não sei qual é o problema.
Tags ssl nginx digital-ocean odoo