Using a /var/www/vhosts/ structure with Virtualmin

4 posts / 0 new
Last post
#1 Sat, 01/25/2014 - 18:30
firefoxchris

Using a /var/www/vhosts/ structure with Virtualmin

Good Evening!

I am currently trying out Vritualmin and have done a bit of Googling around this question but wanted to get the up to date information please.

Is it possible to install Virtualmin from scratch and use a directory structure like /var/www/vhosts/domain.com/htdocs or similar, rather than /home/user/domain/public_html?

This is really for end user simplicity and migration of existing scripts with that structure? I am aware that there could be issues with static paths defined in complid suExec and other components of either Virtualmin or Webmin, so I wanted to check first about the best way to go about it.

I am aware you can change the home path details in the Webmin section but I am unsure how that affects Virtualmin storing hosting websites.

Any information about this would be gratefully received.

Many thanks in advance,

Chris

Sun, 01/26/2014 - 19:11
Locutus

It is highly discouraged to use a structure outside of /home like that with Virtualmin. What exactly would be the advantage of doing that for you?

Mon, 01/27/2014 - 04:28
firefoxchris

Thanks for the suggestion, it's mainly to avoid confusion from users who are either used to the other layout or have absolute paths in code that would no longer be valid. Whilst I understand that is not the best practice, I cant really stop them doing it.

I don't need to do this right now, but I would like to know if it is possible.

Mon, 01/27/2014 - 04:33
lp86

The sites have to be in /home or suexec will not work correctly. You could however use symlinks to create a structure similar to what you want.

/var/www/vhosts/domain.tld could be a symlink to /home/domain and then inside that directory you could create a symlink from htdocs to public_html

If you go changing folders around you will most likely run into many problems. I would recommend changing paths in your scripts, or using symlinks.

I used to use a server that kept sites in a /home/sites/xxx/web structure, but it is easy to just change everything then go through the headaches of moving things around.

If you don't know which files that you would need to change paths in, you could use grep to search for vhosts or something unique to the path so you can see which files would have to be updated.

Topic locked