Problem using nginx
CaptainTyphoo opened this issue · 0 comments
I'm trying to setup anki-sync-server in combination with nginx because I want to use TLS (configured on port 27702). The anki-sync-server itself is working, I can sync when I connect directly to port 27701 over HTTP.
I used the recommended code snippet for nginx from the README page. But I had to change line
proxy_pass http://anki:27701;
to
proxy_pass http://127.0.0.1:27701;
because the orignal line was giving the error message:
nginx: [emerg] host not found in upstream "anki" in /etc/nginx/conf.d/secure.conf:92
When I press the sync button in Anki I get the error message:
Syncing failed:
AnkiWeb is under maintenance. Please try again in a few minutes.
In the logfile of nginx it says:
2017/05/03 00:24:18 [error] 2128#2128: *1783 connect() failed (111: Connection refused) while connecting to upstream, client: 1.1.1.1, server: mydomain.net, request: "POST /sync/hostKey HTTP/1.1", upstream: "http://127.0.0.1:27701/sync/hostKey", host: "mydomain.net:27702"
(I replaced my IP adress with 1.1.1.1 and the domain name of my server with mydomain.net in the error message for privacy reasons)