I installed mariadb, nginx, php7.2-fpm, ufw, fail2ban, zip and unzip as a root in the past. My site is WordPress.
Now I have added an user with root privilages into my server. I won't use root user anymore for security reason.
- I changed user:www-data; to user:newuser; in the nginx.conf
- I run below command to change /var/www chown value
chown -R **newuser:newuser** /var/www/
- I changed php-fpm user values:
user = newuser group = newuser listen.owner = newuser listen.group = newuser
- I changed PermitRootLogin no and restart SSH
My questions are:
- Should I change anything in mariadb or etc?
- chown values of /var/log folder still looks www:data. Should I change it?
- Should I migrate Cloudflare SSL from /etc folder to /home/newuser folder? Because nginx may not see that SSL?
Anything you recommend additionally? Thank you! :)