@naii I haven’t seen your other posts, but what commands have you tried? Any errors? I’m sort of familiar with Hugo and might be able to help.
@max Oh cool.
So, I’ve tried the regular server commands:
$ hugo server
$ hugo server -D
$ hugo server --theme=ananke
$ hugo -v --debug -D
$ lsof -i tcp:1313 (to see which process is currently using port 1313)
All commands ran error-free on the terminal.
I also tried…
$ ps -ax | grep hugo
…got this as the result…
$ 12707 ttys000 0:00.00 grep hugo
…then tried to kill this process by using…
…but then it says…
$ -bash: kill: (12707) - No such process
I should add…
…that when starting the server and opening the browser with the url…
…the browser says…
Couldn’t establish a secure connection. So maybe there’s even an issue with my local https.
I’m pretty clueless right now.
@naii just for shits and giggles try http://127.0.0.1:1313
@max OMG, that’s impossible… BUT… it actually worked *lol* have no idea why :P
THANKS MAXIE!!!… now I need figure out how to make localhost:1313 work.
@max I’m pretty sure it has something to do with the `/etc/hosts` file
@max I moved a step further meaning…
$ sudo apachectl configtest
…and got the response…
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using Alexanders-Mac-mini.local. Set the 'ServerName' directive globally to suppress this message
So. I tried to enter this URL into the browser…
alexanders-mac-mini.local:1313 (for Hugo)
and both work.
So now I want to find a way rename this to localhost.
@naii Apache doesn’t need to have a server name unless you are hosting multiple sites.
For the localhost thing, that will be in you /etc/hosts file.
There should be something like:
This is what’s inside:
@naii hmmm maybe Hugo on Mac just doesn’t bind to that name idk then..
@max Ok, that’s fine.
You’ve been a great help - thanks a lot :)
@max Oh and someone else gave me the tip to use this command to start the server:
$ hugo server -D --baseURL "http://alexanders-Mac-mini.local"
It works well, and I will stick to that solution.
Apart from that he’s pretty sure it’s a macOS Catalina issue, see: https://discourse.gohugo.io/t/macos-catalina-new-hugo-site-localhost-1313-fails-to-open-but-127-0-0-1-1313-works/22746/2
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!