How do I fix 502 bad gateway on nginx?
-
I've been tried all topics about 502 bad gateway about laragon, but still not work.
When I visitlocalhost:8080
then get errors below, and I also can not visit other local site I createdErrors
2021/02/22 10:07:33 [error] 11136#4604: *6 connect() failed (10061: No connection could be made because the target machine actively refused it) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9014", host: "localhost:8080" 2021/02/22 10:07:35 [error] 11136#4604: *6 connect() failed (10061: No connection could be made because the target machine actively refused it) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9013", host: "localhost:8080" 2021/02/22 10:25:56 [error] 9252#6520: *26 connect() failed (10061: No connection could be made because the target machine actively refused it) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9001", host: "localhost:8080" 2021/02/22 10:25:58 [error] 9252#6520: *26 connect() failed (10061: No connection could be made because the target machine actively refused it) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9002", host: "localhost:8080" 2021/02/22 10:26:14 [error] 9252#6520: *26 connect() failed (10061: No connection could be made because the target machine actively refused it) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9002", host: "localhost:8080" 2021/02/22 10:26:16 [error] 9252#6520: *26 connect() failed (10061: No connection could be made because the target machine actively refused it) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9001", host: "localhost:8080"
Here is my dev environment
- win10
- php 7.4.15
- nginx 1.16.0
At first I throught is some process taken 9001 or 9002 port, then I edited
/etc/nginx/php_upstream.conf
file port to 9014 and 9013 and I also tried disable Intel Graph Service but its seems not port taken issue.Now I'm really confused, are there other solutions?
I'm really appreciate you take time to read this topic, and English not my native tongue, plz forgive me any not fluent sentence.
-
I uninstall laragon, and reinstall, it works.