selecting alternative directory

hi - this posting was removed for some reason (and i kept getting “service unavailable” ;-(

formerly i was using “alias” for multiuser-wordpress and it worked GREAT. the problem was with the total lack of flexibility with email.

so, i hit on the idea of just using regular virtual-servers, and changing the DocumentRoot value.

in other words, my “mothership” directory might look like this:

/home/eric-andreychek-fan-club.com/public_html

and my new virtual-servers [former alias] directories might look like this:

/home/eric-andreychek-fan-club-ONE.com/public_html
/home/eric-andreychek-fan-club-TWO.com/public_html
/home/eric-andreychek-fan-club-THREE.com/public_html

so all i need to remove is the -ONE, _-TWO, -THREE so they all the virtual-servers simply use

/home/eric-andreychek-fan-club.com/public_html

i go into the httpd.conf file and change the values at DocumentRoot and Directory

So editing the httpd.conf file works fine, except i usually forget to restart bind services.

is there no way to do this inside of virtualmin? if you see attached, i cannot do it there.

somehow manually editing the httpd.conf file seems like such a non-virtualmin approach. i feel like i am cheating!

hmmm having trouble with forum today… at least i stopped getting “service unavailable”

please see attachment for my directory question.

If you merely changed the document root of a website, why would you need to restart BIND? Moving the home directory of a virtual server to an existing directory is a rather bad idea, that’s probably why it doesn’t work in that form your screenshot shows.

hi Locutus -

the screenshot just showed where i guessed (incorrectly) i might have been able to make such a change.

my hope is to figure out if virtualmin allows me to change the root directory to an existing directory of another virtual-server. remember, this is entirely for multi-user-wordpress. i need to have all the functionality of “alias” but have the email options as well.

when i make manual changes to httpd.conf, i assume that i need to restart bind every time.

Locutus - let me apologize for all these questions today and thank you once again for your help!

Don’t mix up “home directory” and “Apache document root”!

The home directory is the actual Linux user’s home, and contains much more than just the public_html Apache root. If you put the home directory of one virtual server into the same directory as another one, you’ll create a major mess. Try to have two independent parties at the same house, simultaneously, and you’ll see what I mean. :slight_smile:

And no, you don’t need to restart BIND when you make changes to Apache. To continue the analogies, just like you don’t need to wash your car when you have dirty dishes. :wink:

lol@dirty dishes!

ok let me start over (and again i apologize for asking all these pesky questions)

If you put the home directory of one virtual server into the same directory as another one, you'll create a major mess.

i created a virtual-server, and now i wish to “redirect” ONLY where the website stuff lives. nothing else, except for the website stuff (not the home directory)

Don't mix up "home directory" and "Apache document root"!

ok we are not doing any of the home directory stuff, only the references from httpd.conf to anything having to do with the website.

i go into http.conf and change any directory reference from the new server [NEWserver] to the old server [OLDserver] (case thrown in for readability)

< VirtualHost 69.10.48.25:80 >
ServerName NEWserver.com
blah blah blah
DocumentRoot /home/OLDserver.com/public_html
ErrorLog /var/log/virtualmin/NEWserver.com_error_log
ScriptAlias /cgi-bin/ /home/OLDserver.com/cgi-bin/
< Directory /home/OLDserver.com/public_html >
blah blah blah
FCGIWrapper /home/OLDserver.com/fcgi-bin/php5.fcgi .php
FCGIWrapper /home/OLDserver.com/fcgi-bin/php5.fcgi .php5
< / Directory >
< Directory /home/OLDserver.com/cgi-bin >
< / Directory >
blah blah blah
< / VirtualHost >

so my question: does virtualmin allow for such an option as redirecting just the Apache

  1. documentRoot

  2. ScriptAlias

  3. < Directory /> stuff

not the error logs, mail, etc etc just the stuff from httpd.conf?

Try to have two independent parties at the same house, simultaneously, and you'll see what I mean. have you ever been to a pity-party? ;-)

it still feels strange to manually change the httpd.conf file!

and once again and as always, THANK YOU !

It might seem “odd” to do manual changes to the Apache configuration, but that’s indeed what is required in this case. Changing DocumentRoot, ScriptAlias and Directory to the desired new place is all okay.

To have that automatically done with new domains you create, you can make a special Template for that case and adjust the directives in the “Apache Website” section.

The combination of features you’re using there IS a bit unusual, yep, that’s why Virtualmin doesn’t have an out-of-the-box switch for it. Normally you’d use Alias servers for your purpose, which you can’t since you want individual real email accounts. Therefore you need full servers, and have to do manual adjustments to the template to achieve your goal.

Virtualmin is very flexible, but it cannot directly support ALL possible use cases. In unusual cases you have nearly full control using templates though.

this is like a new supermodel girlfriend admitting to me that she has a freckle on her little toe. it probably wont be an issue.

if this helps at all, just issuing the following command gets me to where i need to be:

cp  /etc/httpd/conf/httpd.conf    /etc/httpd/conf/httpd.conf-SAVED ;
sed -ie "s?/home/NEWserver.com/?/home/OLDserver.com/?" /etc/httpd/conf/httpd.conf  ;
apachectl   restart ;  ##  needed!

i get the impression this is such an unusual request that it needs to be done outside of virtualmin?