Skip to content

* block config implies listening on port 80/443 #328

@selfhoster1312

Description

@selfhoster1312

I thought in the docs it was not very clear the difference between global and *, but i've found a non-intuitive difference.

* {
	log "foo.log"
}

example.localhost:4444 {
	proxy "192.168.1.1:443"
}

This fails to spawn the server when run as a normal user (non-root). This works:

globals {
	log "foo.log"
}

example.localhost:4444 {
	proxy "192.168.1.1:443"
}

That's because it tries to bind to 80/443 when using * scope for config, despite no vhost using that port. For example, this also works:

* {
	default_https_port 4443
	default_http_port 8080
	log "foo.log"
}

example.localhost:4444 {
	proxy "192.168.1.1:443"
}

I don't think it's exactly wrong behavior, but it's certainly counterintuitive and i didn't understand that from reading the docs, which use a lot of example with a * block.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions