Closed paambaati closed 9 years ago
What port are you using? Looks like you've connected to dnode with the web browser.
By default the guv-web interface listens on http://localhost:3000
I copied the config in the example, so I connected to 57483
.
Aah, right no - the web monitor config is in a different file.
FWIW, you don't need to create any config files unless you want to override some settings. Even then you only need to specify the properties you want to change.
E.g. if I wanted to change the http port to 4000 and https port to 4001, I'd create ~/.config/guvnor/guvnor-web
and it would contain only:
[http]
port = 4000
[https]
port = 4001
Everything else would be taken from the default config file which is bundled with the app.
Aha, my bad! I feel like the documentation should be a little more clear about this, and the difference between the two. Can I send a PR with changes? If yes, anything specific I should keep in mind?
To add, more confusion! My app runs on port 3000, behind nginx. And I have a custom name for the site, website.dev
, that is mapped to localhost:3000
via dnsmasq on OS X.
Now after I fixed the above port number issue (by setting port to 5000 under [https]
), when I try to access http://website.dev
or http://localhost:3000
, it redirects me to whatever domain I type, but with :5000
appended to it.
Yes please to a PR - I wrote the docs but I'm in too deep - it'd be nice to see stuff from a newcomer's point of view.
By default guv-web runs from an HTTPS server on port 3001. It also starts a plain HTTP server on port 3000 that upgrades the user to https and redirects them to port 3001 on the same host (which is the redirect to :5000 you are seeing above).
Since you're running nginx you can either:
To do 3, disable HTTPS in your ~/.config/guvnor/guvnor-web
file with:
[https]
enabled = false
This will then serve guv-web over HTTP only and not perform a redirect.
When HTTPS is enabled, guv-web will auto-generate an SSL certificate when you start it up if one is not configured. Self signed certificates are not fantastic but I think it's better than accessing it over HTTP.
Alright I made those changes, but guv list
still shows the guv-web process as starting. I checked the logs and here's what I found.
{"level":"error","message":"\u001b[31mNo password salt was found in the guvnor-web config file!\u001b[39m","timestamp":"2015-02-26T07:00:16.292Z"}
{"level":"error","message":"\u001b[31mPlease run\u001b[39m bs-web gensalt \u001b[31mand follow the instructions\u001b[39m","timestamp":"2015-02-26T07:00:16.293Z"}
Now I ran the command guv-web gensalt
(note that the log still says bs-web
and not guv-web
like it should) and it says -
Passwords for all users will need to be reset!
What does the output mean?
Do you have a salt entry in ~/.config/guvnor/guvnor-web
?
I do. The file looks like this.
salt=$2a$10$M3qqqU7ZF5jEN32AG8PC5O
[https]
enabled=false
port=5000
According to guv list
, what user are you running guv-web as?
I'm running it as root. All the config files that we've talked about are in /etc/guvnor
instead of ~/.config/guvnor
. Could that be the problem?
Yeah, that'd do it - you should put the guv-web config files in $HOME/.config/guvnor not /etc/guvnor and you don't need to run guv-web as root, only guvnor itself.
This has been quiet for a while now, please reopen if you're still having problems.
I've followed all the steps on the docs, and after configuring and running guv-web, I only get a JSON response like this when I visit the web URL (
https://localhost:<port>/
).Am I missing something?