![]() |
Apache help
I am a complete newbie and I feel dumb. Anyway I moved the document root from /var/www/html to /home/user/public_html I noticed that is owned by root which I know is bad.
Now I found out Apache is run under www-data. Now do I chown it to www-data or to the user and add the user to Apache group? That is what is confusing me. Also how do I find out if my server is running SuExec and/or SuPHP? thanks |
Hi and welcome to LQ,
You should tell us your distro and apache version, so we could give you better advice Quote:
Quote:
For suPHP check if the module is loaded. Depending on distro (RHEL or Debian based), you can run respectively: Code:
httpd -M|grep suphp |
I am running Ubuntu 16
what I did was the following: sudo adduser username sudo adduser username www-data Now I have to figure out to move /var/www to /home/user/public_html |
Quote:
Don't forget to backup the files you are changing For a complete tutorial about configuring apache and vhosts on ubuntu take a look here |
Quote:
http://www.techytalk.info/enable-use...distributions/ About the permissions, you it's fine for the directories to be owned by root. But if you want to edit them yourself, then you might want to change owner or group: https://www.linuxquestions.org/quest...e-users-37043/ About the only thing you don't want to do is make the files or directories owned by the user or group www-data. The reason is that you don't want to end up in the situation where the web server could ever, ever write to anything it is serving. Bathory's suggestions for permissions work well, though you can get more complex if you are sharing write access to many users. |
All times are GMT -5. The time now is 02:30 PM. |