Where to put web content?

4 posts / 0 new
Last post
#1 Sat, 12/13/2008 - 17:44
flameproof

Where to put web content?

Quite a silly newby question:

I am still in "play mode" with my new VPS. I installed Webmin and Virtualmin (great tools!) and I created a virtual website, let's call it "me.com". So far everything is fine. But....

Where to put web content?

I thought all HTML etc. goes to /var/www/html/me.com/

But seems virtualmin only creates something in /home/ - which I also can't access from the web for now since I can see only whats behind /var/www/html/ when I type in my IP.

Do I just go on an FTP everything to /var/www/html/me.com/ - or how do I go from here?

Just another question: I like your mysql support and it works perfect for me - do I still need phpmyadmin ? Seems webmin can do what I need.

Sat, 12/13/2008 - 19:15
andreychek

Howdy,

There's some programs associated with Virtualmin that are going to work best running out of /home (suexec support, primarily).

If you can, it might be helpful to point a domain at your box, add that as a Virtual Server, and test using the domain.

If you don't have one available yet -- one way around that is to change the primary Virtual Host. You're seeing the content in /var/www when you access your server because that's where the default Virtual Host points.

But, if you change the default Virtual Host to another Virtual Server you've created, that's what'll show up when you browse to your machine by IP.

The default Virtual Host is simply the first "VirtualHost" section that shows up in /etc/httpd/conf/httpd.conf. So create a Virtual Server, then make sure it shows up before all the others, and restart Apache when you're done (/etc/init.d/httpd restart).

At that point, you can upload your content to /home/$USER/public_html.

Regarding phpMyAdmin -- nope, you don't need that all, it's simply that some people prefer one tool over another. If you're fine with what Virtualmin provides, great! And you can always install phpMyAdmin later.
-Eric

Mon, 12/15/2008 - 17:58
flameproof

ok, that's 100% clear. I will stick to /home/...

So how about subdomains?

right now I have a mydomain.com/projects (in that directory) which I like to change to: projects.mydomain.com

Let me guess: /home/$user-mydomain/projects

Is there a FAQ for subdomains?

Mon, 12/15/2008 - 18:11 (Reply to #3)
Joe
Joe's picture

<div class='quote'>So how about subdomains?</div>

A subdomain is just a name. There is, actually, a FAQ about &quot;sub-domains&quot; and other confusions that folks accustomed to cPanel often have with Virtualmin:

http://www.virtualmin.com/documentation/id,virtualmin_for_cpanel_users/

The important thing to understand is that to Virtualmin a &quot;subdomain&quot; and a &quot;domain&quot; are irrelevant. They're just names, and if you create a virtual server named sub.domain.tld, it will be just like any other virtual server, i.e., it will live in:

/home/sub/

If, on the other hand, you wanted sub.domain.tld to be &quot;owned&quot; and managed by a virtual server account named &quot;domain.tld&quot;, you would make it a sub-server rather than a virtual server.

<div class='quote'>Let me guess: /home/$user-mydomain/projects</div>

No. You're thinking in cPanel terms, and we think cPanel is really dumb, in this regard. (We used to support this kind of silliness, but we got over it, and now we disable the sub-domain account type, by default, and we strongly discourage people from using it, as it will be going away entirely in the future. It was our single worst &quot;feature&quot; ever.)

So, if you have mydomain.com/projects, and you want to turn it into projects.mydomain.com, then you would either create a new virtual server (if &quot;projects&quot; is to be managed by someone different than mydomain) or a sub-server within mydomain (if &quot;projects&quot; will be managed by the same person).

Names mean nothing in Virtualmin--don't even think about &quot;subdomains&quot; and &quot;domains&quot;, except in terms of naming things. They have no bearing on behavior in Virtualmin. There is no need to special case subdomains, and it just serves to confuse people.

Sub-servers (virtual servers that are owned by an existing virtual server account) live in the domains subdirectory, and they have a full tree, just like a virtual server (because, if you allow it, they can have all of the same features as a virtual server--including mail, scripts, etc.).

So web content for projects would be in:

/home/mydomain.com/domains/projects/public_html

A little long, I guess, but it's very predictable, and you know that <i>everything</i> relating to a particular virtual server (including its sub-servers and related content) all lives in one place.

And, just in case you're thinking it: joe.projects.mydomain.com would not be a &quot;sub-sub-server&quot;. It would be either a virtual server (if &quot;joe&quot; were going to manage it, rather than &quot;mydomain&quot;) or a sub-server (if &quot;mydomain&quot; is still going to manage it). I mention this to make it very clear that names <i>do not matter</i> to Virtualmin, whether they are subdomains, subsubdomains, or subsubsubsubsubdomains. They're all names, and Virtualmin treats them exactly the same. Your only decision to make when creating a domain is who is going to &quot;own&quot; it: a new account (virtual server), or an existing account (sub-server).

--

Check out the forum guidelines!

Topic locked