Reverse DNS, folder permissions?
I've run my own site for close to a decade on shared hosting, but I'm new to VPS's and don't quite understand some of the stuff I've got to do. I've been trying to set up a LEMP and have been peicing together bits and bobs from the various Linode Library tutorials - one part is following the
The reverse DNS:
1) I don't know what it's for, what it does, why I need it
2) It seems to set the reverse DNS for one domain on my entire Linode? What do I do if I'm hosting two different domains on my Linode? Will sub-domains also need a reverse DNS?
The other part I'm struggling with is getting the right permissions/owners for my site. I've followed
It'd be great if you could point me in a direction for some answers, thanks!
-Matt
6 Replies
You only have one reverse DNS entry which should be the hostname of your Linode, run
hostname -f
on your linode to find your FQDN.
The 403 error could be either
1) Nginx can't access the directory/files or
2) There's no index file for the domain and Nginx can't supply a list of files for the directory.
It depends on what your trying to achieve but in general you'll want the www-data user to have read access to your files which you can achieve by making all the directories 0755 and all the fils 0644, running
chmod -R u+wrX,go+rX /path/to/your/webfiles
will do that.
The files should be owned by whoever you're uploading as which you can set by running
chown -R youruser /path/to/your/web/files
If that doesn't work, details of your Nginx config and what software you're running would be helpful.
I'm not using my Linode for email, so I'm assuming I can just ignore the reverse DNS. I did try what you said but it didn't work…
hostname -f gives me "mrserver.example.com" which only sounds half right. Putting that into the Linode Manager gave a "No match was found for 'mrserver.example.com'. Reverse DNS must have a matching forward entry that points to one of your IPs."
Unfortunately I don't understand DNS terms well enough to know what that error means (beyond there's got to be a forward 'thing' matching the reverse 'thing').
I've run through the first tutorial again and come across this in the FQDN part:
"…edit your /etc/hosts file to resemble the following example, replacing plato with your chosen hostname, example.com with your system's domain name…".
I replaced plato with mrserver - but what is my systems domain name? I don't have a domain name specifically for my system, and the tutorial seems to say it can be anything (i.e., unrelated to the domains I want to host)? Am I supposed to just make a nonsense Domain Zone in the DNS Manager as well and use that?
Thanks again!
If you really can't think of anything then set it to the default Linode one which you can get from running
host yourlinodeip