Page MenuHomeFreeBSD

hugo server: Fix bind and hostname parameters
ClosedPublic

Authored by dbaio on Sat, Jun 5, 8:29 PM.

Details

Summary

When BIND variable is set, baseURL/.HOST should not be set to localhost
by default.

Reported by: imp

Diff Detail

Repository
R9 FreeBSD doc repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

dbaio requested review of this revision.Sat, Jun 5, 8:29 PM
dbaio created this revision.

I don't understand why BIND and HOSTNAME aren't the same variable?

In D30656#689079, @ceri wrote:

I don't understand why BIND and HOSTNAME aren't the same variable?

I imagine people want to bind it to a specific ip/interface and access through a hostname which is different than the ip address.

-b, --baseURL=""    hostname (and path) to the root, e.g.
http://spf13.com/


--bind="127.0.0.1"  interface to which the server will bind

adding @mat, could you please review this as well?

In D30656#689079, @ceri wrote:

I don't understand why BIND and HOSTNAME aren't the same variable?

I imagine people want to bind it to a specific ip/interface and access through a hostname which is different than the ip address.

-b, --baseURL=""    hostname (and path) to the root, e.g.
http://spf13.com/


--bind="127.0.0.1"  interface to which the server will bind

adding @mat, could you please review this as well?

Sorry, to clear, I understand why hugo has them, but I don't really understand why we need them in a development-class Makefile. If we do, then they should be documented so that a human can understand them in the Makefile.

In D30656#689126, @ceri wrote:
In D30656#689079, @ceri wrote:

I don't understand why BIND and HOSTNAME aren't the same variable?

I imagine people want to bind it to a specific ip/interface and access through a hostname which is different than the ip address.

-b, --baseURL=""    hostname (and path) to the root, e.g.
http://spf13.com/


--bind="127.0.0.1"  interface to which the server will bind

adding @mat, could you please review this as well?

Sorry, to clear, I understand why hugo has them, but I don't really understand why we need them in a development-class Makefile. If we do, then they should be documented so that a human can understand them in the Makefile.

In D30656#689126, @ceri wrote:
In D30656#689079, @ceri wrote:

I don't understand why BIND and HOSTNAME aren't the same variable?

I imagine people want to bind it to a specific ip/interface and access through a hostname which is different than the ip address.

-b, --baseURL=""    hostname (and path) to the root, e.g.
http://spf13.com/


--bind="127.0.0.1"  interface to which the server will bind

adding @mat, could you please review this as well?

Sorry, to clear, I understand why hugo has them, but I don't really understand why we need them in a development-class Makefile. If we do, then they should be documented so that a human can understand them in the Makefile.

I understand, both parameters will be used only in specific scenarios for a few users.

HUGO_ARGS need to be documented as well, let's wait for this review and submit this update together.

I asked for this change because I'm constantly running hugo on my beefy server and need to bind it to it's IP address.
make run BIND=1.2.3.4 is what I use here.

I don't know when/if BIND and HOSTNAME would ever be different, thought, or when you'd use hostname w/o bind, but my depth of knowledge here isn't super deep.

This revision is now accepted and ready to land.Mon, Jun 7, 4:42 PM

ok - a comment or two regarding how to use these can follow up. Thanks

This revision was automatically updated to reflect the committed changes.