I run two RPi boxes (OH2 on Openhabian and nGinx on Raspbian). When I access my reverse proxy location, the html comes through but not the CSS and graphics.
The nginx error log show it looking in the ‘/’ location for graphics (i.e. file not found - /var/www/html/icon/switch). I suspect the same problem for finding the CSS.
Here is the site-enabled config:
server {
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
server_name 10.10.231.242;
ssl_certificate ssl/mysite.crt;
ssl_certificate_key ssl/mysite.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
add_header Strict-Transport-Security “max-age=31536000; include Subdomains;”;
server_name 10.10.231.242;
location / {
root /var/www/html;
}
location /openhab/ {
proxy_http_version 1.1;
proxy_set_header Authorization "";
proxy_set_header Host $proxy_host:$proxy_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-proto $scheme;
proxy_set_header X-Forwarded-Host 10.10.231.242:8080;
proxy_set_header Upgrade $http_upgrade;
proxy_buffering off;
proxy_cache_bypass $cookie_session;
proxy_no_cache $cookie_session;
proxy_pass http://10.10.231.242:8080/basicui/app/;
}
}