Disclaimer: I know my way around Linux, but I'm out of the loop for a while.
I have a CentOS 7 server where I host a couple of my small websites in /var/www/website1
, /var/www/website2
and so on. Now I want to add one more website which will have big files. I started uploading stuff and got a "out of disk space" message. When I run df -h
I get below output:
[root@ns304241 kosa]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 20G 19G 4.7M 100% /
devtmpfs 7.8G 0 7.8G 0% /dev
tmpfs 7.8G 0 7.8G 0% /dev/shm
tmpfs 7.8G 885M 7.0G 12% /run
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
/dev/md3 1.8T 48G 1.7T 3% /home
tmpfs 1.6G 0 1.6G 0% /run/user/1000
Notice that my /home
directory is 1.8T while /var/www
is, I assume on /dev/root
device, which is only 20G.
I was under an impression that websites should be hosted in /var/www
for the simple reason of having multiple users access to the website files and peace of mind with permissions against hosting websites in /home
.
- Is my system set up in some weird way? Shouldn't
/var
be on the big (1.8T) drive, as all the logs are there and can easily take up a lot of space? - Should I move my websites to
/home
? - But what if I need two different users to access the same website files?
- What's the best approach?