Help configuring lighttpd Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
lanznaster
Posts: 39
Joined: Thu Sep 05, 2019 10:26 am

Re: Help configuring lighttpd

Post by lanznaster »

To make sure it was the original configurations, I did a new installation.

Installed lighttpd only
Did the symlink:

Code: Select all

 ln -s /etc/lighttpd/conf-available/10-proxy.conf /etc/lighttpd/conf-enabled/10-proxy.conf 
Added the configuration to the /conf-available/10-proxy.conf

Restart lighttpd service

Changed the port fowarding to this new installation, and I get the same result :(

But if I open locally it works: http://192.168.1.137/sonarr/

But not from outside, even without the sonarr part.

Any ideias?
User avatar
Joulinar
Posts: 2572
Joined: Sat Nov 16, 2019 12:49 am

Re: Help configuring lighttpd

Post by Joulinar »

if you are not able to connect even without sonarr part, issue seems to be on port forwarding. At least the default lighttpd web site should be shown. Are you able to connect to default side if you switch of 10-proxy.conf ?? Just to check if thinks are working in general.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
lanznaster
Posts: 39
Joined: Thu Sep 05, 2019 10:26 am

Re: Help configuring lighttpd

Post by lanznaster »

Joulinar wrote: Wed Nov 18, 2020 1:13 pm if you are not able to connect even without sonarr part, issue seems to be on port forwarding. At least the default lighttpd web site should be shown. Are you able to connect to default side if you switch of 10-proxy.conf ?? Just to check if thinks are working in general.
Do you mean removing the symlink?
User avatar
Joulinar
Posts: 2572
Joined: Sat Nov 16, 2019 12:49 am

Re: Help configuring lighttpd

Post by Joulinar »

yes correct, and restart lighttpd. Usually you should have a plain standard installation and you should be able to reach default web site from internet.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
lanznaster
Posts: 39
Joined: Thu Sep 05, 2019 10:26 am

Re: Help configuring lighttpd

Post by lanznaster »

Same results. Something is failing at the port foward then. Not sure why :(
User avatar
Joulinar
Posts: 2572
Joined: Sat Nov 16, 2019 12:49 am

Re: Help configuring lighttpd

Post by Joulinar »

you are forwarding port 80 and 443 TCP to your new device? There is nothing blocking this? I mean another firewall? There are a couple of tools on the web allowing to perform a port scan on your internet router. This should show if port 80/443 are open an reachable.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
lanznaster
Posts: 39
Joined: Thu Sep 05, 2019 10:26 am

Re: Help configuring lighttpd

Post by lanznaster »

you are right.

With the fresh installation I only have port 80 open, not the 443. And with the original installation, I have both open.

So is the new machine that have port 443 closed? Or is it the router that cant connect to that port? How can I check this?

Thanks
User avatar
Joulinar
Posts: 2572
Joined: Sat Nov 16, 2019 12:49 am

Re: Help configuring lighttpd

Post by Joulinar »

on DietPi themselves there is nothing blocked or closed as long as you don't install any firewall software.

Means you router is the only one controlling which port is forward from internet to your DietPi system. In a default configuration lighttpd is liten on port 80 only. So doesn't matter if port 443 is forward. 443 comes into picture if you are going to activate HTTPS.

Open ports can be checked as follow

Code: Select all

ss -tulpn | grep LISTEN
Pls have a look to your router to check how port forwarding is setup. There should be a single rule only, forwarding port 80 to your new DietPi system. It should not be possible to forward port 80 to the old and the new system same time.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
lanznaster
Posts: 39
Joined: Thu Sep 05, 2019 10:26 am

Re: Help configuring lighttpd

Post by lanznaster »

It was because I have letsencript install on the original machine, and not on this one. This is why the port 443 was not open.
Thank you very much

Now back to the original purpose of this thread :)

Now, when I use this:

Code: Select all

$HTTP["url"] =~ "^/code($|/)" {
         proxy.header = (
   "map-urlpath" => ( "/code"  => "" )
  )

         proxy.server  = ( "" =>
        (( "host" => "192.168.1.94", "port" => 8443 ))
    )
}
I'm able to reach the login page, but once login, it does not direct me to the next page, stays in the login page.

I'll check the documentation to see if there is any other config that I may use.
User avatar
Joulinar
Posts: 2572
Joined: Sat Nov 16, 2019 12:49 am

Re: Help configuring lighttpd

Post by Joulinar »

for me following was working on 10-proxy.conf. Don't forget to have it activated again as we disabled it for testing.

Code: Select all

$HTTP["url"] =~ "^/sonarr($|/)" {
        proxy.server  = ( "" =>
        (( "host" => "127.0.0.1", "port" => 8989 ))
    )
}

$HTTP["url"] =~ "^/radarr($|/)" {
        proxy.server  = ( "" =>
        (( "host" => "127.0.0.1", "port" => 7878 ))
    )
}
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply