Nginx not re-directing to host
-
Following @JaredBusch's guide here: https://mangolassi.it/topic/16651/install-nginx-as-a-reverse-proxy-on-fedora-27
Port Forwading (For Testing) -- This is forwarding to my Nginx VM.
Google Domains DNS Settings:
#contents of
/etc/nginx/conf.d/nc.skynetli.com.conf
All
.conf
files should be read as per the nginx.conf file. Specifically this:
I'm sure there is some detail I am not seeing as to why the nginx server is not re-directing to the nextcloud server. Any help is greatly appreciated.
-
@wirestyle22 remove the comment in front of ssl stapling and then
nginx -t
. That should break it and let you see an error related to the conf file.Assuming it does, then you know the file is being parsed
-
No error
[root@nginx conf.d]# nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
-
@wirestyle22 said in Nginx not re-directing to host:
No error
[root@nginx conf.d]# nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
Your
conf.d
folder is not being parsed.Why would be a really good question.
-
@jaredbusch Yeah but why? In my nginx.conf file it includes
/etc/nginx/conf.d/*.conf;
.Could a Syntax problem cause this?
-
@wirestyle22 said in Nginx not re-directing to host:
@jaredbusch Yeah but why? In my nginx.conf file it includes
/etc/nginx/conf.d/*.conf;
.Did you install new, or is this the same system you had problems with before?
-
@jaredbusch New Fedora 27 Minimal but exact same issue. Has to be me.
-
@wirestyle22 So how did you configure Fedora?
Take it back to the stupid level to find what you are doing different.
Here are the screens for Fedora 25.
https://mangolassi.it/topic/13498/how-to-install-fedora-25-minimal -
@jaredbusch My installation is identical with the exception of guest agents. I can't imagine that would affect whether or not a
.conf
file was read though. This would all be self-contained, no? -
@wirestyle22 said in Nginx not re-directing to host:
@jaredbusch My installation is identical with the exception of guest agents. I can't imagine that would affect whether or not a
.conf
file was read though. This would all be self-contained, no?Should be of course. Your experience is abnormal. I set this up 3 times last night wile making these instructions.
-
Either your config messed up somewhere or SELinux is interfering.
-
@black3dynamite said in Nginx not re-directing to host:
Either your config messed up somewhere or SELinux is interfering.
It should error if there a syntax problem though right? It should be reading any .conf in conf.d.
-
sudo tail -5 /var/log/nginx/error.log
2018/03/11 23:42:31 [error] 681#0: *14 connect() failed (113: No route to host) while connecting to upstream, client: 192.168.1.1, server: nc.skynetli.com, request: "GET /favicon.ico HTTP/1.1", upstream: "http://192.168.1.202:80/favicon.ico", host: "nc.skynetli.com", referrer: "http://nc.skynetli.com/"
-
@wirestyle22 ok, so your proxy cannot talk to your backend server is seems.
So a networking issue.
Can you ping 192.168.1.202 from your proxy?
Can you SSH into it from your proxy? -
@jaredbusch I can do both
-
@wirestyle22 said in Nginx not re-directing to host:
failed (113: No route to host) while connecting to upstream
I am seeing a 502 bad gateway on your link. Which obviously point to that upstream issue.
-
@dbeato said in Nginx not re-directing to host:
@wirestyle22 said in Nginx not re-directing to host:
failed (113: No route to host) while connecting to upstream
I am seeing a 502 bad gateway on your link. Which obviously point to that upstream issue.
Unsure where to really look config-wise to resolve it. From what I see, everything is correct
-
What ports see you using to communicate with the upstream server?
-
@wirestyle22 said in Nginx not re-directing to host:
@dbeato said in Nginx not re-directing to host:
@wirestyle22 said in Nginx not re-directing to host:
failed (113: No route to host) while connecting to upstream
I am seeing a 502 bad gateway on your link. Which obviously point to that upstream issue.
Unsure where to really look config-wise to resolve it. From what I see, everything is correct
I usually try to setup the port on the configuration:
proxy_Pass http://192.168.1.202:80;
-
@dbeato said in Nginx not re-directing to host:
@wirestyle22 said in Nginx not re-directing to host:
@dbeato said in Nginx not re-directing to host:
@wirestyle22 said in Nginx not re-directing to host:
failed (113: No route to host) while connecting to upstream
I am seeing a 502 bad gateway on your link. Which obviously point to that upstream issue.
Unsure where to really look config-wise to resolve it. From what I see, everything is correct
I usually try to setup the port on the configuration:
proxy_Pass http://192.168.1.202:80;
I noticed that JB didn't specify the port in his most recent guide but did in his original guide (was port 80). I tried both ways with the same result.