• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


webgui and nginx
#1
Hi,

I don't know why and how but the build in webserver seems to block nginx ports after a restart of my raspberry.

Therefore I want to host the webgui with nginx as webserver.
What I've tried so far is simply copy the default folder to the nginx folder and try to load it in my browser but all it does is keep loading and not showing my devices. Other websites are working fine with my nginx configuration.

Is it possible to host the webgui with nginx and if it is, how?

I hope anybody can help me.
 
Reply
#2
Make sure the webgui is not running on port 80, and make a reverse proxy in nginx.
 
Reply
#3
(03-10-2015, 01:44 PM)bazb Wrote: Make sure the webgui is not running on port 80, and make a reverse proxy in nginx.
Thanks for the answer but could you give me an example config or a link to it and does it fix the problem that the page keeps loading or that nginx is blocked by the pilight internal webserver
 
Reply
#4
pilight:
Code:
sudo service pilight stop
Code:
"settings": {
        "log-level": 4,
        "pid-file": "/var/run/pilight.pid",
        "log-file": "/var/log/pilight.log",
        "send-repeats": 4,
        "receive-repeats": 1,
        "webserver-enable": 1,
        "webserver-root": "/usr/local/share/pilight/",
        "webserver-port": 8080,
        "webserver-cache": 1,
        "whitelist": "192.168.0.*",
        "firmware-update": 1
    }
Code:
sudo service pilight start

Nginx:
Code:
server {
            listen  80;
            server_name  domainname.com;
            charset  utf-8;

            location / {
                proxy_read_timeout  300;
                proxy_connect_timeout  300;
                proxy_set_header  Accept-Encoding  "";
                proxy_pass  http://localhost:8080;
            }
        }
Code:
sudo service nginx restart
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  webgui, after reboot the switch is off gwaag 4 1,627 11-04-2019, 04:16 PM
Last Post: gwaag
  webgui apparence gwaag 7 1,749 10-29-2019, 09:00 PM
Last Post: curlymo
  Modifying Webgui Alex 4 1,880 03-10-2019, 05:50 PM
Last Post: Alex
  pilight & piSchedule works fine but no webgui Sven 4 1,724 01-13-2019, 06:12 PM
Last Post: Sven
  webgui - registry "tabs": 1 usage and possibility to order fcoelho 3 4,303 03-22-2018, 07:31 PM
Last Post: Oliver
  New tab in webgui Roger 0 1,019 09-15-2017, 02:14 PM
Last Post: Roger
  Cannot connect to WebGUI von BlackBerry 10 device. muecke 2 1,572 12-02-2016, 10:22 AM
Last Post: muecke
  WebGUI support for illuminance sensors marcm 2 1,741 11-30-2016, 01:49 PM
Last Post: marcm
  Webgui Remuko 1 2,515 09-17-2016, 10:14 AM
Last Post: buldogwtf
  WebGUI doesn't retrieve state Thunder84 1 1,712 05-01-2016, 08:35 PM
Last Post: Thunder84

Forum Jump:


Browsing: 1 Guest(s)