Article 4QJ49 can't get nginx to work

can't get nginx to work

by
rblampain
from LinuxQuestions.org on (#4QJ49)
I am using nginx for the first time and I cannot find why I cannot get it going under Debian 9.
I am trying to test plain html files located on a Linode before assigning DNS records which seems to be the conventional way of testing without giving world access to the files. When I ssh to the Linode IP address, I can see all the files and read them with nano.
I have tried to have the "server blocks" in
/etc/nginx/conf.d
and then move them to
/etc/nginx/sites-available
with symlinks in sites-enabled, in both cases, the config files are found to be correct.
I tried /etc/hosts:
ip_address hostname.mydomain.tld
and
ip_address mydomain.tld
ip_address www.mydomain.tld
The results are invariably a long "waiting for ip_address" followed by "connection reset...." although at one stage I got a 404 on index.html but I could not isolate the difference in the code.
It seems the problem is with the hosts file or hostname or both which seem to me to have correct values.

I simply cannot find a tutorial or howto on this specific subject.

Has anyone any suggestion?

Thank you for your helplatest?d=yIl2AUoC8zA latest?i=nuNGfDt0JFA:_8cWPEtF3cs:F7zBnMy latest?i=nuNGfDt0JFA:_8cWPEtF3cs:V_sGLiP latest?d=qj6IDK7rITs latest?i=nuNGfDt0JFA:_8cWPEtF3cs:gIN9vFwnuNGfDt0JFA
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments