I have a VPS and don't host any sites yet.
When I create a domain "mydomain.com" in Virtualmin, shouldn't it also create a directory "mydomain.com" for websites?
My web directory would be: /var/www/html/mydomain.com/ - but /var/www/html/ stays empty.
Did I make an error somewhere? Wrong Apache setup?
So where would I put my html pages?
CentOS Linux 5.2
Default web directory files for each domain you create are written to the home directory so if cd /home you should see mydomain folder inside this folder you should see public_html folder this is where you place all html files for your virtual websites.
Of coarse there are lots of pre-configuration you need to do to make it a working live environment. IE running under home directory will have an invalid Apache SuExec directive path Apache has been compiled for installation under /var directory for this this can be changed under virtualmin settings.
Well, my question is, where I put the websites before I go live?
Do I create them in /home/mydomain.com/ or in /var/www/html/mydomain.com/ ?
BTW: my VPS is already net connected and I login via webmin (###:10000) or SSH. But I am not sure how to view web content now, other then what I put in /var/www/html/mydomain.com/
I put all my websites in /home/sitename. The name of this directory is the username assigned by your or the default taken from the domain name of the site you created as root. Most installations of webmin will create the user for beemaster.ca as beemast
Virtualadmin is setup by default to do this. You will have less problems if you stay with supported defaults. It makes it easier for Jamie and others to help you. Also placing your sites under /home/ will allow your users to access their sites to place files etc more easily. There is no real advantage of using /var/www. You will also have to reconfigure Virtualadmin to do so.
Virtual admin creates the access for site owners automatically. You don't have to do anything other than create the site Virtualamin. The site owner logs into ftp uploads the files to the publichtml directory and they are online. If you are running cgi things get a little more complicated for you as the stock apache installed by your system may not allow execution under the home directories. This is a relatively easy fix with James install script.
You will experience less problems if you use the site owner rather than root install application and files.
For example if you setup mydomain.com
You would use Virtualadmin as root to do so. Fallow the prompts in Virtialadmin.
To upload the html to the site. Login with ftp as user mydomain and you will see the world on the server as mydomain. cd to the publichtml directory and upload your html, php, stylesheets and images files. This give all files the proper location and ownership to be used by apache.
This will be true for your html files and cgi if you use them. Although cgi-files will never be in publichtml. They will be in cgi-bin in your site root directory next to publichtml. If you put them in publichtml they will be downloaded as a file and not executed. Not a good idea to let anyone have your active programs they contain all kinds of secure stuff.
Think of each of your sites created as a user, which technically they are, be that user when you administer them. If you log into webmin as the site owner you only see the things that the site owner has the right to see and change. The same is true for FTP and ssh. This lets you see what is available for your customers when they administer their sites. Files are placed in the right, with the correct ownerships place for apache to see and use them.
Hope that helps
Hi it looks like you need help in getting your virtualmin configured and setup once and for all of this is the case then send me an email to
info(at)linuxhostuk(dot)co(dot)uk and i help you on setup.
Thanks for that deep reply. I will keep it there then.
I will follow virtualmins FAQ to check how to see the web pages before they go online.
You will see them at
it will display the index.html file for that domain.
I have the same problem.
I think what happened was that after the CENTOS 5 install, I installed Webmin.
then I realised the the Centos install was not done fully so more functions were then added (by the server guys).
I then installed Virtualmin Pro (using install.sh)
web sites are at /home
but the system thinks they are at /var/www/html (I think)
I'm sure its just a simple change (is it somethign to do with the Suexec config file)
thanks for any help
Virtualmin I think has set up correctly,
hmm, web site seems to have appeared once I put up some default content.
(I mean using default content through VirtualMin, just ftp'ing content did not work)