note this is NOT related to Apache and I'm not looking for Apache-centered answers.
I am using the Hugo static site generator to create sites and trying to test on a MacBook running Sierra.
I am able to start the server with
hugo server -Dw
And the server starts on localhost:1313, however when I try to access that URL I get a 404. 127.0.0.1:1313 works, but then all of the links fail as they try to resolve back to localhost.
I was able to access by enabling a domain name on my router (foo.home) and then I can open the main page with localhost.foo.home:1313, but all of the Hugo links still try to use localhost:1313.
So, two questions:
- Can I change the behavior of Hugo to use 127.0.0.1? I tried changing the baseURL in config.toml to localhost, 127.0.0.1 and the foo.home domains, but that didn't seem to do anything.
- Or, can I change the /etc/hosts file to resolve localhost?
Right now /etc/hosts has four entries - I am wondering if I can add another entry for 127.0.0.1 localhost but there's a warning about not making changes as it will break configuration of the loopback interface.