Web Hosting Talk







View Full Version : virtual domain on virtual site


adad
03-11-2001, 07:52 PM
I have a RaQ 3 at 4webspace.com. Suppose this case:

1. Virtual site: site1.com
2. User site: site1.com/~user2

I need that a new domain (site2.com) points to site1.com/~user2

In a "normal" unix server I would change apache's httpd.conf to point to:
/home/sites/site1/users/user2 instead of /home/sites/siteNNN/web, as the GUI does by default.

This can't be done from Cobalt's GUI. Appart from voiding garantees, and that old story, how can I do it? Support@tera-byte tell me they can only support it via redirection.net. They are right, it's not supported. But that's not the service I want to provide. I want to make virtual hosting :) .

My question is: IF I change the httpd.conf file for this very domain, won't I be able to make any changes for ANY domain in my server, or only for THIS domain in particular?

I have read about Jeff Bilicki's shell tools (I believe they are installed by default in OS update 4). This allows for setting up virtual sites, users, deleting them, etc.

Will I have to resign EVERY action from the GUI for EVERY domain in the server, or only those commands affecting apache for THIS very domain?

Regards from Madrid,
Daniel

iplexx
03-12-2001, 04:15 AM
just an idea:

1.) generate site1 & the users on site one
2.) generate site2
3.) login via telnet, cd /home/sites/www.site2.com
4.) rm web
5.) ln -s /home/sites/www.site2.com/web /home/sites/www.site1.com/users/xyz/web

thats it.

notes:
- check the path in step 5, just did it out of my mind
- step 4 deletes the web directory of site2
- step 5 generates a symlink called web (which we deleted in 4.) to the userweb of site1
- this should work for 99%, I didn't try it

adad
03-12-2001, 04:16 PM
Thanks, iplexx, I'll try and then will tell if it works.

Cheers,
Daniel

adad
03-12-2001, 09:42 PM
Great iplexx!

It really works fine! Now my question is how to allow email for *@site2.com to work with this configuration... Any ideas?

Daniel

Starhost
03-13-2001, 11:07 AM
This works for me :)

----------------------------------------------------------------------------
On Sat, 21 Oct 2000, Trevor Munday wrote:

> Searched the archive and knowledge base and found a part answer but looking
> for something a little more secure!
>
> A customer wants to be able to accept e-mail at domain.com and domain.co.uk.
>
> Yes I could set-up 2 virtual sites, but I want to be able to collect the
> e-mail using 1 virtual site.
>
> How can I configure a RaQ3 to accept the second domains e-mail using a User
> account in the virtual site of the first domain?

Hi Trevor,

Sorry if some of the stuff below is a bit basic, but I don't know how
familar you are with editing system files on your Raq.

Bear in mind that editing system files technically invalidates your
warranty (but then how can anyone administer a Raq properly without
editing system files....).

Assuming that you want mail for domain.co.uk to go to a user on
domain.com and that the user's name is user1:

First set up DNS for domain.co.uk and domain.com as normal, including MX
records. Then set up a virtual site in the control panel for domain.com,
but not for domain.co.uk. Set up user1 for domain.com

Login as root

Back up the files that you will be editing:
cp /etc/sendmail.cw /etc/sendmail.cw.backup
cp /etc/virtusertable /etc/virtusertable.backup

Then edit the files as required:

pico -w /etc/sendmail.cw
Go to the end of the file and type:
domain.co.uk
http://www.domain.co.uk

Then Ctrl-X to exit from pico and save the file

pico -w /etc/virtusertable
Go to the end of the file beneath the line that reads "# Put custom
additions below" and type:

@domain.co.uk user1
@www.domain.co.uk user1

Then Ctrl-X to exit from pico and save the file

Then at the command prompt type:
/usr/bin/makemap hash /etc/virtusertable < /etc/virtusertable
/etc/rc.d/init.d/sendmail restart

Now you should be set up so that user1@domain.com will get all the email
for anyone@domain.co.uk

You might also want to add a line to the virtual server setting for
domain.com in your /etc/httpd.conf file so that anyone going to
http://www.domain.co.uk ends up at http://www.domain.com. Remember to back up httpd.conf
first.

To do this add the following line below the existing ServerAlias line:

ServerAlias domain.co.uk http://www.domain.co.uk

Hope that helps.

Regards,

Roger Harrison
----------------------------------------------------------------------------

Succes with it