Unable to view website via subdomain
I have followed this official guide of setting up nginx and hosting a stating website. I replaced all instances of example.com with stuff.flashblaze.xyz.
My name servers are on Vercel (formerly Zeit). I have also created A
record of stuff to point to my IP address and enabled reverse DNS on Linode with value of stuff.flashblaze.xyz which did not give any errors. After following the complete guide, I can view the website by going to my IP address, and
dig +short stuff.flashblaze.xyz
also gives the correct IP address.
However, on going to stuff.flashblaze.xyz it says Unable to connect. What am I doing wrong?
This is my stuff.flashblaze.xyz.conf
file
server {
listen 80;
listen [::]:80;
server_name stuff.flashblaze.xyz www.stuff.flashblaze.xyz;
root /var/www/stuff.flashblaze.xyz;
index index.html;
access_log /var/www/stuff.flashblaze.xyz/logs/access.log;
gzip on;
gzip_comp_level 3;
gzip_types text/plain text/css application/javascript image/*;
}
Running sudo systemctl status nginx
gives this output
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2020-07-08 17:43:24 UTC; 10h ago
Docs: man:nginx(8)
Process: 20813 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=1/FAILURE)
Process: 23523 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 23513 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 23526 (nginx)
Tasks: 2 (limit: 1109)
CGroup: /system.slice/nginx.service
├─23526 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
└─31107 nginx: worker process
Jul 08 17:43:24 localhost systemd[1]: Starting A high performance web server and a reverse proxy server...
Jul 08 17:43:24 localhost systemd[1]: nginx.service: Failed to parse PID from file /run/nginx.pid: Invalid argument
Jul 08 17:43:24 localhost systemd[1]: Started A high performance web server and a reverse proxy server.
2 Replies
Hey,
After taking a look via curl
, it looks like the subdomain is serving something now:
~ curl stuff.flashblaze.xyz
<!DOCTYPE html>
<head>
<meta name="author" content="Unknown">
<title>Demo</title>
</head>
<body>
<div>
Hello World!
</div>
</body>
I'm not sure when you made your DNS updates, but this may have been a propagation issue. If I am ever making DNS changes I like to check a site like DNSChecker.org.
Regardless, I am glad to see that the subdomain is serving information now. If you ever have any issues you can definitely feel free to contact Linode Support. We're always happy to help.
[@jecochard] (/community/user/jecochard) thanks for the reply. I made the changes around 12 hrs before I posted the question i.e. around 8PM IST. I'll be sure to keep your suggestions in mind. And once again, thank you for your assistance.