-1

As the title suggest, I was wondering if there is a technical reason behind naming a web application's documentroot with the domain name? From my limited experience, it seems that including the domain name would be useful only in circumstances where you host multiple sites of the same name under various domains (example.com, example.org, etc). When that is not the case, /var/www/example is fine.

3 Answers 3

2

I think it's really a case of personal preference, unless the company you work for has an existing standard convention for this.

If the sites all belong to one domain, you might want to use the name of the virtual host (e.g. www or shop), but if you're hosting multiple domains, you might choose the use the FQDN.

It's really up to you, but try to use a convention that you can consistently use for all the virtual hosts you are going to be using.

2

There is no difference, it's just a directory name. It's just easier to recognize what domain is it serving if you use domain names. That's it.

1

.. at the end of the day you can name it this way or another, as long as you can find whatever you're looking for later on you should be OKAY)) there is no difference as far as apache pulling files to serve them to end-user, so it's all about "organizing skills".

Not the answer you're looking for? Browse other questions tagged .