17 posts / 0 new
Last post
#1 Tue, 12/23/2008 - 10:08

Site preview

I've read the various topics on site preview before DNS propogation, but I still cannot see my virtual site to work.

I set up Webmin and Virtualmin using the automated install script. This worked fine. I set up my first virtual domain and copied an index file into its directory (/home/martyn/public_html). After I did this, lo and behold, I can see the page at (the IP address of my server on my local network).

I then followed the instructions to add /home/%0/public_htm to the Default virtual server by clicking the Automatic Virtual Hosts icon and switching the radio button by Automatic virtual host root to the one beside the empty field, and filling in the field with /home/%0/public_html

Now when I type into the browser I get "Not Found The requested URL / was not found on this server. Apache/2.2.3 (CentOS) Server at Port 80" This may be correct behavior, but I get the same or similar messages when I type: and (I wasn't sure what the correct address was, so I tried all 3 possibilities)

I am guessing that I have missed a step. Any ideas?

Centos 5.2 Apache/2.2.3<br><br>Post edited by: martynw, at: 2008/12/24 12:51

Tue, 12/23/2008 - 10:11

Well, there's a few different ways to do that, and we can look into this further to figure out why what you did isn't working as expected...

However, there may be an easier way as well -- if you log into Virtualmin, click Services -&gt; View Website via Webmin -- and you'll be able to browse your site without having the DNS pointed at your server yet.

Sun, 06/07/2009 - 07:34 (Reply to #2)
ronald's picture

this might be solved as I can see the site.
Else you want to add to your pc the IP and domainname.
go to
open hosts file and add kkandkcpas.com

Fri, 12/26/2008 - 09:03 (Reply to #3)

I reinstalled CentOS and the install.sh script and the virtual domains are working fine now.

I used Ronald's method for testing and that works well. I think what may have happened before was that my migration from cPanel worked as far as creating the databases BUT it didn't copy any site content or any mailboxes, so when I tried Ronald's method before the public_html directory was empty, hence the error.

Sat, 09/14/2019 - 09:07 (Reply to #4)
brayanlp's picture

Thank man, I was search this.

la misma de siempre

Tue, 12/23/2008 - 16:09

Thanks for the advice.
Eric, under Virtualmin Services I see:
[ul][li]Configure Website
[/li][li]DAV Authentication[/li]
[li]DNS Domain[/li]
[li]Mailing Lists[/li]
[li]Protected Directories[/li]
and under Configure Web site I have:
Processes and Limits
Networking and Addresses
Log Files
Document Options
MIME Types
Error Handling
User and Group
Aliases and Redirects
CGI Programs
Directory Indexing
SSL Options
Automatic Virtual Hosts
Show Directives
Edit Directives

But I don't see a &quot;View Website via Webmin&quot; option. In Webmin - Servers - Apache Web server, I see OPEN options, but these simply open the Web site which is currently hosted on another server.
Could you point me in the right direction?

Ronald, I did as you suggested and when I now type kkandkcpas.com I get:

Not Found

The requested URL / was not found on this server.
Apache/2.2.3 (CentOS) Server at kkandkcpas.com Port 80

It makes me think that Virtual Admin is not serving up the site and that is why I can't see it in preview mode.


Tue, 12/23/2008 - 16:12

I think that function is only on the paid version (so far). It is on my Christmas wish list too.

Tue, 12/23/2008 - 17:01

Thanks Flameproof for the clarification - I am thinking the same.

Tue, 12/23/2008 - 17:25

I checked out the Apache error logs:

[Tue Dec 23 19:21:07 2008] [error] [client] File does not exist: /home/

It looks like %0 is picking up the IP address rather than the name of the domain.

Wed, 01/07/2009 - 12:36

&gt;&gt; I think that function is only on the paid version (so far)

As a new potential customer trying to evaluate Virtualmin, I'm really getting tired of running into things like this that are not in the GPL version.

I cannot find any document on this site that really compares the GPL version with the paid Pro version. This is VERY frustrating. I'm about ready to give up and remove Virtualmin and use something else that I can evaluate properly.

At this point I'm just trying to view a new virtual site. The real site is already running on another server but I need to be able to test it on my Virtualmin server to be sure it's working before cutting the old server to the new server (I'm trying to migrate existing sites on other servers into VMs within my Virtualmin server).

So I guess I'll look at the other ways of doing the proxy. But the &quot;View website via Webmin&quot; REALLY needs to be added to the GPL version asap.

Wed, 01/07/2009 - 13:37 (Reply to #10)

Hi Zugg,

I know the site preview function is nice, but in the meantime, you can always solve that problem by adding the IP address of your test server to your hosts file (which will work on Windows or Linux):


You can add that in when you're ready to do some testing, and just comment it out when you're done.

You're right, not all the Pro features are included in the &quot;Compare&quot; URL listed on the bottom of the page. I'll talk to Joe about building a more comprehensive list.

And indeed, the forum software has issues :-) They're working on a new site as we speak though, which should take care of a things like editing posts.


Wed, 01/07/2009 - 12:38

Sorry for the double post. Your forum system needs a way for users to delete their own posts, or some protection from having the Back button doing a duplicate post. Anyway, sorry.

Wed, 01/07/2009 - 15:23

Thanks for mentioning the Compare link at the bottom. I hadn't seen that yet. Honestly, the links at the *bottom* of a web site should be for stuff like Privacy Statement, Press, etc and not for *useful* links. In your site redesign you should really be placing a lot of those bottom links onto a side navigation or at the top where people can find them.

Anyway, with your suggestion about the hosts file, that's not the problem. I can get to the main Virtualmin web site on my server via the IP address. But I cannot get to any of the other virtual sites that I've added. In other words, the server has a single IP address that is shared by multiple virtual sites. Using the IP address only goes to the first/main virtual site. The rest of the sites require the domain name from to redirect Apache to the proper VirtualHost entry. And I cannot change the DNS for the domain names until I'm sure the new virtual sites will work.

So I'm like the others in this thread where I need something like:

where is the IP address of my box, and &quot;subdomain&quot; is one of my other virtual sites. I cannot use the normal alias version of http://subdomain.mydomain.com because mydomain.com isn't in the DNS server yet...all I have is the IP address.

Wed, 01/07/2009 - 15:28 (Reply to #13)
Joe's picture

<div class='quote'>Anyway, with your suggestion about the hosts file, that's not the problem.</div>

Yes, actually, if you add the names to your hosts file, they will work. Your client will then be including the hostname in the request.

<div class='quote'>So I'm like the others in this thread where I need something like:</div>

This is covered in the FAQ:



Check out the forum guidelines!

Wed, 01/07/2009 - 16:34

Woot! Thanks for the help...the Hosts file idea worked great. I was able to point www.mysite.com to my existing site, but then point just mysite.com to the Virtualmin site. Don't know why I didn't think that would work.

Well, that's a good first step. Now I can at least view my web sites on the Virtualmin server. Now if I can only solve the PHP4 problem mentioned in my other thread, I'll be all set.

Btw, the link http://www.virtualmin.com/component/option,com_openwiki/Itemid,48/id,fre... was way over my head. Neither of the &quot;better&quot; methods work because the second requires Virtualmin Pro and the third requires a subdomain of the main Virtualmin site, and my Virtualmin site isn't even in DNS yet (and won't be while I'm still just evaluating all of this). So that leaves the first methods, which are way over my head.

But I can use the Hosts method just fine at this point.

Mon, 07/22/2013 - 16:02

Just edit the file /etc/httpd/conf/httpd.conf and append

UserDir public_html

this works, i spent 2 days looking for it. I just wanted to have users preview their website using http://ip/~username

Mon, 11/04/2013 - 12:52

The method above only works for static HTML files (php does not work on this option), and is apparently a security risk:


Topic locked