Tried a lot of variations.. this is one
file:
/etc/nginx/sites-enabled/alarmdecoderThis should be the same as the original as installed except for the addition of these lines:
listen 443 default ssl;
ssl_certificate /etc/nginx/ssl/nginx.crt;
ssl_certificate_key /etc/nginx/ssl/nginx.key;I'll add another possible clue.. in IE, I get a partial display with the menu,
Logged in .. Please Wait Loading... etc. and IE warns that only the secure content is displayed. Choose to display all content (or reload) and the "The plain HTTP request was sent to HTTPS port" message comes up. There is no error message in /var/log/nginx/error.log (except the aforementioned css error).
- Code: Select all
server {
listen 80;
listen 443 default ssl;
ssl_certificate /etc/nginx/ssl/nginx.crt;
ssl_certificate_key /etc/nginx/ssl/nginx.key;
error_page 502 /502.html;
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 4k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
location / {
try_files $uri @alarmdecoder;
}
location @alarmdecoder {
proxy_pass http://127.0.0.1:5000;
include uwsgi_params;
uwsgi_param UWSGI_SCHEME $scheme;
uwsgi_param SERVER_SOFTWARE nginx/$nginx_version;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
}
location /502.html {
root /opt/alarmdecoder-webapp/ad2web/static;
}
location ~ \.(jpg|jpeg|png|css|js)$ {
root /opt/alarmdecoder-webapp/ad2web;
}
}