all websites are opening the /home directory and users can see and access all the virtualservers' folders

13 posts / 0 new
Last post
#1 Mon, 05/23/2016 - 10:29

all websites are opening the /home directory and users can see and access all the virtualservers' folders

Hi all.

all websites are opening the /home directory and users can see all the virtualservers' folders
domains (virtual_servers) should open /home/virtual_server_user/public_html/ instead
Webmin version 1.795 Virtualmin version 5.03.gpl
Any idea on how I could tackle this? After un update, perl stopped working. then fixing perl, I ended up updating (an also reinstalling) postfix, and apache and MySQL. During the process, Virtualmin made me install lots of modules. So I don't really know what I changed.

Perhaps someone has experience something like this before?

Thanks in advance

Mon, 05/23/2016 - 10:34


Hmm, I'm not completely certain I understand what is occurring there.

Can you share, say, a screenshot of an example that shows what happens when browsing to a directory you have there? Or perhaps share an example domain that's showing this behavior?


Tue, 05/24/2016 - 10:53 (Reply to #2)

Hi. Thanks for your reply.
I had to turn off the server. otherwise, would be open - but here is the screenshot:

If I browse any of those websites, I end up I the Home directory .

I guess now you can understand better what goes on there.

Tue, 05/24/2016 - 15:30

Wow that's really odd!

My best guess is that there's a misconfiguration in the Apache config, that is redirecting traffic to the wrong place.

It's possible that there is a VirtualHost that is using /home as it's DocumentRoot, rather than the correct location.

What you may want to do, is first verify what domain is actually responding to that request. Check in $HOME/logs/access_log, and make sure that there is a corresponding log entry in there.

Once you've verified what domain is responding to the request, we'll then need to review the Apache config for that domain. I'm particularly interested in seeing the DocumentRoot, but any of the Apache config could be to blame.

Also, what distro/version is it that you're using?


Wed, 05/25/2016 - 05:23

I am using Debian 8.4 jessie
Webmin version 1.795 Virtualmin version 5.03.gpl

Yep. It was using /home as document root in apache webserver config..
THis is what showed in Webmin apache config page, for the virtualserver:
Virtual Server Any 80 Automatic /home
Somehow it had lost the virtualmin servers that were there.

Now, to test, I created manually a new virtual server with:
Virtual Server 80 /home/adss/public_html
But now when I try to reach the domain, I receive a 403 forbidden page.

The $HOME/logs/access_log (I understood that this goes to, e.g. /home/adss//logs (adss is a virtual server)
only has logs before the problem started (22nd of May).

To test, I tried creating a new virtual server for another domain I had and its logs come empty (and I also get the 403 forbidden page)

Looks like the domain is not reaching the virtual server.


Thu, 05/26/2016 - 11:34

HI again. I just checked this thread, actually all troubles started when I upgraded webmin / virtualmin and perl stopped working (could not create new Virtual Servers. I reinstaed perl and then Virtualmin asked to reinstall lots of stuff (apache modules, etc.9 That was how things started.

Hope to hear from you soon Cheers

Thu, 05/26/2016 - 18:31

Well, note that a domain will show "Forbidden" if there isn't a website loaded into the public_html folder.

Is there a site located there in your case?


Fri, 05/27/2016 - 02:18 (Reply to #7)

Hi. That is not the case. There are the sites in the /home/[server]/public_html. My htaccess (one of the sites) is:

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Module Rewrite is enabled

To sort out problems I even tested (after reading your comment) creating there a index.html "hello world" file.
And it retrieves me the forbidden page.
logs in the $HOME/logs/access_log (I understood that this goes to, e.g. /home/[site]/logs
only have logs before the problem started (22nd of May).
Is there a way to know where the http requests are hitting? because I think they are not arriving to the virtual server.

Any other idea?

Fri, 05/27/2016 - 09:25


Yeah it does sound like requests are hitting another site.

You may want to view the files in /var/log/virtualmin -- there, you can see based on the time stamps which access logs are being written to.

You may also want to review this document here titled "The wrong website shows up":

Fri, 05/27/2016 - 09:50 (Reply to #9)

Hi. I checked the link you sent. thanks.
I feel I am to go in the right direction: the websites don't show there in the enabled websites.
Now I'll have to figure out how I will be able to make them show :D.
If I don't get it, I'll ping here.
But if you have a quick fix, fill free to tell me :D

Fri, 05/27/2016 - 10:16

Hi again.
The sites do not how in the sites enabled links. They are only on the sites available.
I created a link for one of the missing sites in the sites enabled. But then apache does not restart: Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
I already searched for that error message but still digging....
I'll keep you posted, i the case you have a magic shortcut for the solution.
Is there a way to "recreate" a webserver without deleting the info that is already there?
Becaasue it seems to work with a test site I created after checking your last message


Fri, 05/27/2016 - 10:52

ok. Looks like it is solved.
So, for other guys that might come here:
Issue was -
1 - The links to the virtualservers had disappeared from /etc/apache2/sites-enabled.
2 - I understood that to create the links the better precedure was to use Apache webserver configuration (on webmin) > create virtualhost
3 - I had to remove some lines from the [server].config file. and here I need your opinion to know if this might create me any problems:

php_admin_value engine Off
php_value memory_limit 32M

thank you very much for your help.

Fri, 05/27/2016 - 11:31


Removing those lines is no problem, and might be required if mod_php isn't enabled.

If you're using FCGID (the default) or CGI, you also don't need mod_php.

So it sounds like you may be good!


Topic locked