Best Path for nginx Sites

Hi folks. I currently have an nginx server (AL 8.7) and I’m having permissions issues. The home for a handful of vhosts is /usr/share/nginx/html/ and I’m thinking this should be moved somewhere so that permissions won’t creep up. Currently sites are owned by root:root, and that path has all sites owned this way.

Can I move this to /home/myself/sites? Is this recommended? What is the best location for these sites to live?

@daBee , is the content of each of the websites intended to be treated as independent? Which is what I believe you are intending to happen?

Perhaps place the website content for each of the sites under /var/www/html/{web1,web2,web3} for your web1, web2 and web3 websites respectively. Ensure you set the SELINUX context correctly for every bit of content (files and directories), especially if you have SELINUX setenforce=1 set.

The POSIX (general Linux) files permissions could be set respectively with web1user:web1group, web2user:web2group, etc… etc… respectively on the parent directory where the home begins for the content.

I am sure someone else will chime in.

There is no /var/www directory. The other issue with that is that /var permissions would have to change for that as well. Right now I have permissions issues that make me want to migrate these directories to ~.