Abu Mami
02-03-2004, 03:23 AM
Hi,
I've just succeeded in installing Apache 2 on my server and now I've got a question...
What is the recommended configuration for paths? That is, where should I keep my websites? Several options that I've seen are:
/var/www/html/<website>
/usr/local/apache/htdocs/<website>
/home/<website>
/www/<website>
/web/<website>
Needless to say, this has given me a headache. It seems that everyone has his own favorite. But, is there any one "best" way? Or am I "free" to decide on what's best for me?
Of course, the same goes for the paths for the log files. I've seen them save in all the combinations as I listed above, with the addition of a "logs" subdirectory. For example:
/home/logs/<website>
/www/logs/<website>
Pass the aspirin please.
Thanks.
sprintserve
02-03-2004, 06:25 AM
The best way is to keep it on it's own partition. towards that end, you can use /home /www or /web and it doesn't matter. As long as you know what you used and provide the full paths to your users who need them.
As for logs, know that unless you back it up and delete often, you would want to allow more space for it. It is also good that logs are in their own partitions if you can.
End of the day, this is to isolate them as much as possible so that it doesn't cause problems. for example if you experience, a DDOS and tons of logs are generated, and your log directory is actually just a subdirectory on / and not on it's own partition, if the partition fills up, it can cause problems.
Similar with /home, you can mount it with different options to prevent uses from executing files from it for example.
End of the day, you can pick your favourites, but know the rationale behind some forms of configurations and make your own informed judgements.
Abu Mami
02-03-2004, 06:30 AM
Thanks for the advice sprintserve. I had a feeling it was something like what you said, but I wasn't sure. Now I can finish setting up my box.
Thanks again.
Brightadmin
02-06-2004, 01:09 AM
Hi
You can use \"/var/www/html/\" to keep your websites. Also you can use \"/var/log/httpd\" to catch your logs.
Regards,
Abu Mami
02-06-2004, 06:25 AM
Originally posted by Brightadmin
Hi
You can use \"/var/www/html/\" to keep your websites. Also you can use \"/var/log/httpd\" to catch your logs.
Regards, Thanks, I was thinking of doing something like this. I ended up putting everything in /home. So, to use your method:
/home/<sitename>/public_html
/home/<sitename>/log
Is there a problem using /home? I have my sites in /home since the box is really just for my use. Other sites that I'm hosting (sort of as a favor), will be in standard /usr/local/apache/htdocs. Does this seem reasonable?
Thanks again for the advice.
sprintserve
02-06-2004, 06:36 AM
It is fine to have everything in /home. At least if you run out of space, the server won't crash/.
Abu Mami
02-06-2004, 08:14 AM
Originally posted by sprintserve
It is fine to have everything in /home. At least if you run out of space, the server won't crash/. Well, that was sort of my thinking. I just wasn't sure if there were any security issues involved. I'm glad that this scheme is OK, I don't feel like changing things now :-)