Score:0

Nginx: Accessing website by domain name will throw ERR_TIMED_OUT

kh flag

Steps I did:

I've Debian VPS and I've bought domain "marek-prusa.dev" on Google Domains.

Steps how I configured my webserver with domain name "marek-prusa.dev".

I've created marek-prusa.dev file in /etc/nginx/sites-available/.

Then I've put this configuration in marek-prusa.dev file:

server {
    listen 80;
    server_name marek-prusa.dev;
    root /var/www/marek-prusa.dev;
    index index.html;
}

In /var/www/marek-prusa.dev I've created index.html file with some content.

I've created symlink by sudo ln -s /etc/nginx/sites-available/marek-prusa.dev /etc/nginx/sites-enabled/

And then I restarted nginx by sudo systemctl restart nginx

After that I've created A record in Google Domains:

@    A    3600    89.221.218.233

The problem:

I've checked if my DNS was propagated and it is. Google Domains are showing me website preview with exact content I've put inside /var/www/marek-prusa.dev/index.html. But if I will reach directly http://marek-prusa.dev in browser, it will throw ERR_TIMED_OUT error.

I was also checking my iptables for port 80 and it also look ok:

 0     0 ACCEPT     tcp  --  *      *       89.221.218.233       0.0.0.0/0            tcp dpt:80
 2598  132K ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:80 
/* 'dapp_Nginx%20HTTP' */
Jaromanda X avatar
ru flag
your server forwards requests on http (port 80) to https(port 443), so seems to be working fine
Score:0
kh flag

The problem was that I did not configured https for my website. And server was forwarding http to https as @Jaromanda X said.

So I've generated ssl certificates by certbot and that solved the problem.

Patrick Mevzek avatar
cn flag
As your registrar should have explained to you when you registered the domain, as `.dev` is a Google TLD and Google decided to put all its TLDs in the HSTS preloading list, this has the consequence that all major browsers will only do HTTPS queries to such names, and never HTTP ones by default.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.