Just tested with
location /pimatic {
rewrite ^/pimatic/(.*) /$1 break;
proxy_pass http://127.0.0.1:80;
proxy_set_header Host $host;
}
but the interface didnt load corrent
[SOLVED] pimatic with nginx
Just tested with
location /pimatic {
rewrite ^/pimatic/(.*) /$1 break;
proxy_pass http://127.0.0.1:80;
proxy_set_header Host $host;
}
but the interface didnt load corrent
pimatic + MySensors + Homeduino + z-way
https://github.com/n3roGit/MySensors_n3ro
I got the same when running a reverse proxy on my server to the raspberry(pimatic). It only loads text, no graphics.
Try the solution from http://serverfault.com/questions/350012/apache-proxypass-missing-images
nginx and apache are quite similar.
thy for reply. but iis still not working
Damn!
pimatic + MySensors + Homeduino + z-way
https://github.com/n3roGit/MySensors_n3ro
Its probably not possible to use a subdirectory (yourhost/pimatic). Try to use an subdomain instead (pimatic.yourhost):
The nginx config from demo.pimatic.org:
server {
listen 80;
server_name demo.pimatic.org;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://127.0.0.1:8080/;
proxy_redirect off;
# Socket.IO Support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
Now its working with the root dir.
location / {
proxy_pass http://127.0.0.1:80;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host 'pimatic';
}
i thing some image paths in pimatic are not relativ, so the nginx shows no pictures with redirect roules.
pimatic + MySensors + Homeduino + z-way
https://github.com/n3roGit/MySensors_n3ro
FOLKS ITS DONE
It works with the following config
location /pimatic/ {
rewrite ^/pimatic/(.*) /$1 break;
proxy_pass http://127.0.0.1:80;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host 'YOUR.DOMAIN.COM';
proxy_redirect http://YOUR.DOMAIN.COM/ https://YOUR.DOMAIN.COM/pimatic/;
sub_filter '"/' '"/pimatic/';
sub_filter_once off;
}
pimatic + MySensors + Homeduino + z-way
https://github.com/n3roGit/MySensors_n3ro
I tried using the sub_filter approach and it does not work. For some reason ‘"/’ is not matching correctly, and thus is not replaced. If I put ‘/assets/’ instead it works, but I don’t really like it (also I would need to add a sub_filter for each thing that’s wrong).
@abmantis hmm its work like charm in my setup with subdir. try to delete all old cached files.
pimatic + MySensors + Homeduino + z-way
https://github.com/n3roGit/MySensors_n3ro
@n3ro weird… what versions of nginx and pimatic are you using?
Please post your log files from nginx and pimatic
pimatic + MySensors + Homeduino + z-way
https://github.com/n3roGit/MySensors_n3ro
@abmantis Ever found out what the problem was?
My Nginx is acting the same way.
Follow my domotica project on http://maredana.nl
I got it running with direct call www.domain.com
and with www.domain.com/pimaitc
.
But how can I realize to have on www.domain.com
an welcome screen and only on www.domain.com/pimaitc
my pimatic login with grafics?
Nobody? The hook is to have www.domain.com/pimaitc
with grafics. Have tried may possibilities, but no one works.
Either the GUI was not loaded correctly or I wasn’t able to have the two ways www.domain.com
with welcome or what ever and www.domain.com/pimaitc
.
I ended up making a subdomain, couldn’t get it to work otherwise.
Follow my domotica project on http://maredana.nl
I just can’t get rid of this point. It must be somehow possible to run pimatic behind a NGINX proxy in a subdomain. Obviously it also runs somehow, but there is still the topic with the GUI rendering. Is this a problem of NGINX or pimatic?