Welcome to the Linux Foundation Forum!

/var/www vs /srv/www

I'm much too young for the nuances of past deliberations to be passed down from the forums that I visit.

I would like some background as to why /var/www/html was decided as the webserver root for webservers such as Apache. I'd certainly think that /srv/www/ would make sense within the FHS.

My thought is that not all sites are dynamic. From my P.O.V. it is rather smaller components of sites that are dynamic and any changes to a site are generally made by a web administrator or web developer.

Comments

  • ericegan
    ericegan Posts: 35
    edited December 2023

    Great question as it illustrates an important point! Ultimately, everything is arbitrary in systems. There is logic to be sure but ultimately it is a human being that decided to call off and on 1 and 0. And the arbitrary decisions build from there. While there may be some specific, logical reasoning behind placing files in one directory structure over another, and there may be use in studying the history for memorization purposes, keep in mind that someone, somewhere made a decision that has implications for the systems we choose to work with. You are welcome to look up the answers to whys. Much of the time, the answer is nothing beyond, "I had to put things somewhere." If you find an answer to your question that you feel is helpful beyond the scope of the course, feel free to post! Discussions surrounding this sort of thing can definitely be enlightening.

  • Hi @rineerk, as Eric said, it's an interesting question! I'm not too old to know the history of this, of when some distros introduced the use of /var/www/html. What I want to add, is that the good thing is that you can modify the default setup and use /srv/www instead. Flexibility is one of the best features of Linux and Open Source :)

    Regards,
    Luis.

  • Thanks for the insight to you both. Happy holidays.

  • Hi @rineerk, it's a pleasure! Many thanks, happy holidays to you as well :)

    Regards,
    Luis.

Categories

Upcoming Training