I am installing nginx. Here is the steps I followed:
- Make index.html file in /root directory
edit /etc/nginx/nginx.conf. After edit it looks like this:
user nginx; worker_processes 1; error_log /var/log/nginx/error.log; ... http { ... server { listen 80 default_server; server_name my_domain_name.com; root /root; ... }
- following this question I gave away permissions:
gpasswd -a nginx root
chmod g+x /root
(sorry, couldn't correctly format as code)
- I restarted server:
service nginx restart
I visited my_domain_name.com and got 403 error. /var/log/nginx/error.log content:
"/root/index.html" is forbidden (13: Permission denied), client: 117.211.86.108, server: my_domain_name.com, request: "GET / HTTP/1.1", host: "my_domain_name.com"