I want virtualmin to use /var/www/ as its base

Disclosures:

*I’m new at system administration, but I want to learn. Heck all “experienced” admins were noobs once right?

*I installed virtualmin from webmin as a module

*No there’s no way for me to use the install.sh script as its a rented and unmanaged server. They charge for a fresh install so I have to do it way

This is in light of this error.

“The Suexec command on your system is configured to only run scripts under /var/www, but the Virtualmin base directory is /home. CGI and PHP scripts run as domain owners will not be executed.”

I saw in this thread http://www.virtualmin.com/node/10150 which seems to suggest me that it is indeed possible to change virtualmin’s base directory. There was also mention of using the default apache version that comes with the os instead of the one with virtualmin.

I also saw in another thread one of the frequent contributors Eric or Joe mentioning that virtualmin is flexible.

Joe always mentions that there are two modes of apache - virtual hosting(suexec) and the single serving mode(mod_php)

I will exactly specify my need. I run a free hosting site and i provide website creation for free. Free users get subdomains that are actually sub-directories masqueraded to be subdomains using .htaccess. So this is my main site. Right now my main website, all is good and working well. My idea is that suexec isn’t needed for this main site as such as it uses mod_php.

And the virtualmin I installed to provide the users who pay with a limited user account. So I want virtualmin to handle those sites. Is it possible to run these websites with suexec and my main site with mod_php.

So, I want to leverage both modes of apache. How can I do this? By running two instances of apache? Is it efficient?

Or do I just forget the notion of a main site and host everything in /home, including my main site?

Howdy,

Although the manual installation you’re working on is considered fairly complex, there are instructions to help guide you through it. You can read about that here:

http://www.virtualmin.com/documentation/installation/manual

If possible, I would suggest putting all of your sites on CGI/FCGID using suexec. That’s the most secure setup you can use, and it should be fairly straight forward to move your mod_php site over to suexec.

-Eric

Joe always mentions that there are two modes of apache - virtual hosting(suexec) and the single serving mode(mod_php)

You’ve misread me, or at least conflated to different topics.

The modes of Apache with regard to virtual hosting (using NameVirtualHost and VirtualHost sections) and serving a single website (using DocumentRoot in the root section of httpd.conf) do not determine whether applications run under suexec or mod_php. Either will work in a NameVirtualHost configuration…though that doesn’t speak to what you should do in a virtual hosting context from a security standpoint.

There is nothing stopping you from using mod_php for some sites, and suexec+mod_fcgid for others, but there’s also generally no benefit to using mod_php (performance and resource-usage wise, it’s usually a wash as to which is better, though in high load environments, there’s pretty good evidence that mod_fcgid performs better). The configuration is decided on a per-virtual server basis.