Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Sep 12, 2014 11:23 am 
Offline
Senior Newbie

Joined: Thu Sep 11, 2014 4:25 pm
Posts: 6
I've only had my Linode set up for a couple weeks now. I don't know when exactly it happened but the instructions for Configuring Name Based Virtual Hosts in this guide https://www.linode.com/docs/websites/hosting-a-website have changed since my initial set up.

It's basically the same but the big difference I see is that now this guide is putting virtual hosts in the /var/www/ directory. When I set up my hosts a couple weeks ago this same guide said to put virtual hosts in /home/user/public/mydomain.com/

so my DocumentRoot in my .conf files look like:
DocumentRoot /home/user/public/mydomain.com/public

The DocumentRoot in the current version of .conf code in the guide look like :
DocumentRoot /var/www/example.com/public_html

Why would this have changed?

What is the difference between these two different DocumentRoots?

Is is better to file in /var/www/?

Does having multiple Virtual Hosts affect where they should be filed?


Top
   
PostPosted: Fri Sep 12, 2014 12:20 pm 
Offline
Senior Member

Joined: Mon Jan 02, 2012 12:45 pm
Posts: 365
saladdays,
You can use either location. The /var/www location is the default for some distributions, such as Ubuntu. I always use the /home/user location.

Just so you know, you can use any directory you want. For example, I don't use the 'public' directory. I use something like:
- /home/msj/mainstreetjames.com (for the main site)
- /home/msj/demos.mainstreetjames.com (for the demos site for my clients to see)
- /home/msj/test.mainstreetjames.com (test code for clients before the changes go live)

I could just as easily use:
- /var/www/msj/mainstreetjames.com (for the main site)
- /var/www/msj/demos.mainstreetjames.com (for the demos site for my clients to see)
- /var/www/msj/test.mainstreetjames.com (test code for clients before the changes go live)

or:
- /var/www/mainstreetjames.com (for the main site)
- /var/www/demos.mainstreetjames.com (for the demos site for my clients to see)
- /var/www/test.mainstreetjames.com (test code for clients before the changes go live)

or:
- /clients/sites/msj/mainstreetjames.com (for the main site)
- /clients/sites/msj/demos.mainstreetjames.com (for the demos site for my clients to see)
- /clients/sites/msj/test.mainstreetjames.com (test code for clients before the changes go live)


MSJ


Top
   
PostPosted: Sun Sep 14, 2014 10:02 am 
Offline
Senior Newbie

Joined: Wed Sep 03, 2014 2:00 pm
Posts: 13
I usually use /srv/www/mydomain.com or /var/www/mydomain.com - I try to keep everything really organized because I usually have a lot of virtual hosts on my servers.


Top
   
PostPosted: Wed Sep 17, 2014 11:44 am 
Offline
Senior Member

Joined: Wed Oct 20, 2010 12:11 pm
Posts: 142
I use /var/www/users/<user>/ for their domains. Then they have a <user>-web chroot'd to their folder.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group