[Freedombox-discuss] updates to plinth
- Subject: [Freedombox-discuss] updates to plinth
- From: firstname.lastname@example.org (Mathieu Jourdan)
- Date: Sun, 8 Apr 2012 20:28:58 +0200
- Message-id: <[🔎] CAKf=CETaDY8fxhRiFL2qRHwqNdVqUTfFhuA=gXtX8J5iHYW6jw@mail.gmail.com>
- In-reply-to: <email@example.com>
- References: <4F5B9980.firstname.lastname@example.org> <CAKf=CEQ1sO9WFvaoPkR_vapLmXufTh744TvHn26POrPSzka-3Q@mail.gmail.com> <email@example.com> <firstname.lastname@example.org>
Le 12 mars 2012 19:55, James Vasile <vasile at freedomboxfoundation.org> a ?crit :
> On Mon, 12 Mar 2012 14:15:36 -0400, James Vasile <vasile at freedomboxfoundation.org> wrote:
>> It should run on the plug, and not just listen on localhost.
> Here's the thing. ?If the device is a router, it gets upstream (dhcp,
> usually) from eth0 and should serve DHCP on eth1 to the LAN. ?In that
> case, you probably want Plinth to listen on eth1, but not on eth0. ?If
> the device is on your net but isn't your router, you want it to get
> upstream connectivity from eth0 and you also want Plinth to listen on
> eth0 (and maybe eth1 too) for connections from the LAN.
> I haven't yet figured out how to detect where Plinth should listen. ?I'd
> appreciate input on this one.
I tried to modify Plinth in order to access it from my web browser.
Plinth was listening to 127.0.0.1:8000, so I edited plinth.py to use a
variable called cfg.host, which is defined in cfg.py with the value
Now, I can access the plinth homepage, but only this one. In the left
menu, "Developer's manual" and "FAQ" give me "Error: 500". In the top
menu bar, every link except "Log in" performs a redirection to
127.0.0.1, which of course isn't appropriate. I didn't succeed in
trying to correct this.
If you don't want Plinth to listen everywhere, I suppose you want it
for administration purpose only, and we will have to come with an
other solution for everyday use of freedombox. Else, if we use webapps
through Plinth for jabber chat or blog publishing, why Plinth
shouldn't listen everywhere ?
Supposing you want to listen only to the relevant interfaces, it could
be interesting to identify those interfaces in the
/etc/network/interfaces file. For example, maybe Plinth could retrieve
interfaces to listen to by parsing this file. I never used this
before, but it seems there is a mapping directive which may help in