LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-16-2014, 10:37 PM   #1
Tim Abracadabra
Member
 
Registered: May 2014
Location: USA, Wherever I may Roam
Distribution: Debian w/Xfce, LFS 7.9, ++
Posts: 117

Rep: Reputation: Disabled
Question Plus and minus - Virtual web host accounts in /var/www or /srv/www mounts


Hi LQ,
I was not sure where to put his but the question seemed so basic that I felt it more appropriate here than in the server forum.

A google search seems to come to the consensus to use /var/www opposed to /srv/www for web site data files. I seem to have a different opinion and want to ask LQ members what they think.

Edit add: Consider primary disk 80GB, Secondary 0.5TB w/LVM.

If you have a shared apache web server say under Debian, I see a benefit of storing the web site pages/accounts/domains in /srv as I can easily create this mount on another disk/NAS, etc... that can be expanded as the number of accounts and their sizes grow. It may also be easier to backup by the admin and even by the individual user/account owner to their local system.

On the other hand most configurations and documentation default to /var which is typically on the same partition as root / (Although I have often in the past given /var it's own partition).

I tend to think of /var as the home for variable data such as logs and dynamic data files.

Web sites tend to be have more static files and where they are dynamic it is typically in regard to a database and some php code. So it may be served on the fly dynamically but much stays static (Not considering e-commerce web sites here where products and their prices, etc may change frequently but ...).

So what are your thoughts on using /srv or /var for hosted web site files?

Thanks,
Tim

Last edited by Tim Abracadabra; 07-17-2014 at 12:16 AM. Reason: typo, missing "by", add search google, add disk spec
 
Old 07-18-2014, 08:31 PM   #2
kewball
LQ Newbie
 
Registered: Jul 2014
Posts: 1

Rep: Reputation: Disabled
https://wiki.debian.org/FilesystemHierarchyStandard is where I go to seek consensus. I see a lot of folks using /opt differently than what Debian suggest. As for me, /var is my junk drawer because it just grows and grows.
 
1 members found this post helpful.
Old 07-25-2014, 02:56 AM   #3
Tim Abracadabra
Member
 
Registered: May 2014
Location: USA, Wherever I may Roam
Distribution: Debian w/Xfce, LFS 7.9, ++
Posts: 117

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by kewball View Post
https://wiki.debian.org/FilesystemHierarchyStandard is where I go to seek consensus. I see a lot of folks using /opt differently than what Debian suggest. As for me, /var is my junk drawer because it just grows and grows.
Thanks kewball for the excellent link.

It describes well what is the current status quo and what applications likely default to on Debian (And likely others especially in that branch). Most useful and informative

I do agree with you that /var can become the "Junk drawer" on the system. That is why I posed the question as to using /srv for particular services thereby "naturally" relegating them to there own .. drawer.

Consider the Filesystem Hierarchy Standard (Doc which is somewhat dated .... 2004). Particularly /srv : Data for services provided by this system.

While to utilize the /srv mount point after the fact(Server Install) which would then require symlinks, bind, or other options which may open up its own "can of worms", I was looking specifically for answers in using /srv from the "get go" when first building the server. My apologies if that was not clear .

If I may, please let me try to clarify a bit further:
In particular, I was looking for insight from LQ members into what concerns about or issues they may have run into when configuring a server to use /srv for sql DB, Web site and mail accounts, etc as opposed to using the "default" /var mount point for these services and data.

I guess it is really the "Admin's choice" but I respect your/LQ input to help me make an informed decision.

Are there any "Gotch ya's" besides configuring the proper path during application install that one may need to look out for?

Any Admin/Security/Stability concerns?

All thoughts are welcome and I appreciate any and all help for this linux admin nooby.

Thanks again for your help and
all the best.

Tim

Last edited by Tim Abracadabra; 07-25-2014 at 03:38 AM. Reason: Add clarification intent + typo
 
Old 07-25-2014, 04:23 AM   #4
Tim Abracadabra
Member
 
Registered: May 2014
Location: USA, Wherever I may Roam
Distribution: Debian w/Xfce, LFS 7.9, ++
Posts: 117

Original Poster
Rep: Reputation: Disabled
FYI,
Just found this: Using /var/www vs. /srv vs. /home/user/public_html.

I did not see/find this before when I looked but of course it depends on your query terms!

As the thread above is by LQ, it's definitely worth the look.
I just can't see how I didn't find it before??
Thanks to all who contributed to that thread :-D

Looking it over.. It may be relevant (dated 2010) however, at a quick glance it seems more about Apache with which I am already quite comfortable (But always looking for more).

I'm more concerned with the email, mysql, .. aspects.

Anyone?

All the best and with respect,

Tim

Last edited by Tim Abracadabra; 07-25-2014 at 05:25 AM. Reason: Add my focus re: The linked thread in case that helps.
 
  


Reply

Tags
apache2, domain, hosting, mount point


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/srv/www/htdocs/index.html content opensuse apache/lamp/cacti test server 127.0.0.1 Glenn D. Linux - Software 1 09-17-2013 02:30 AM
[SOLVED] Run php web project on apache2 using /var/www fortran Linux - Server 6 03-29-2012 07:34 AM
right user for copying files into /var/www/virtual? i dont want to use root! Babelduo Linux - Server 2 03-10-2011 10:31 AM
[SOLVED] Using /var/www vs. /srv vs. /home/user/public_html NightSky Linux - Server 11 09-06-2010 12:30 AM
Permissions of web server folders(cgi-bin, var/www/html) niner710 Linux - Newbie 14 05-14-2008 10:54 AM


All times are GMT -5. The time now is 08:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration