Project

General

Profile

Actions

Bug #3015

closed

Reconfiguring server port does not work

Added by triatic almost 4 years ago. Updated almost 4 years ago.

Status:
Invalid
Priority:
Low
Category:
-
Target version:
-
ASK QUESTIONS IN Forums:
No

Description

If
server.port = 80
is set and in a later configuration file
server.port := 8080
is set, the port stays at 80 and is not reconfigured to 8080 as the operator := should do.

For comparison if I set
server.error-handler-404 = "error.html"
and later on I set
server.error-handler-404 := "error.php"
then the error handler does change. But it won't work for server.port.

Actions #1

Updated by gstrauss almost 4 years ago

Please read: https://redmine.lighttpd.net/boards/2/topics/5

I am unable to reproduce this with a simple test on the master branch using

server.document-root = "/dev/shm" 
server.bind = "127.0.0.1" 
server.port = 80
server.port := 8080

Actions #2

Updated by triatic almost 4 years ago

Thanks for your reply.

Does your port 80 stay open after server.port := 8080 ?

Actions #3

Updated by triatic almost 4 years ago

For clarity, I am attempting to modify the default pi-hole lighttpd configuration by placing server.port := 8080 in conf-enabled.

It's possible I am missing another configuration option which is setting port 80.

Actions #4

Updated by triatic almost 4 years ago

I think I've found it:

# default listening port for IPv6 falls back to the IPv4 port
include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port

Is it possible to unbind port 80 or rebind it to another port when created via $SERVER["socket"] == "[::]:80" ?

Actions #5

Updated by gstrauss almost 4 years ago

  • Category deleted (core)
  • Status changed from New to Invalid
  • Priority changed from Normal to Low
  • Target version deleted (1.4.x)

Marking bug report as Invalid. When submitting issues, please always include as much detail as possible.

When asking questions, please ask questions in the Forums, not by submitting issues.

lighttpd configuration is intended to be very simple, as I demonstrated with the simple test-case config above. Unfortunately, many distributions provide their own configuration scripts and integrations which make things more complex for the end-user. use-ipv6.pl is one such script. If you do not need IPv6, just comment the line out. If you want lighttpd to listen on a different port, you can just as easily modify the lighttpd.conf.

You can run `lighttpd -f /etc/lighttpd/lighttpd.conf -p` to have lighttpd print what it sees as the config after reading all the include files.

Actions #6

Updated by triatic almost 4 years ago

Editing lighttpd.conf is an option but pihole overwrites this file on every update.

I accept this appears not to be a bug, now that I know server.port is not the only way to configure ports.

Actions

Also available in: Atom