[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Point 2 domains to the same dir / root user / preview virtual domain



Hello,

> - Is it possible to point a (sub)domain to a custom directory? e.g. I want
> to point domainname1.com & domainname2.com to the same dir:
> /home/sites/site1/web/ ? Is this possible?

Yes, this is possible, but only with some manual work. Do the following.

1. Edit the file /etc/httpd/conf/httpd.conf. Add the line

        Include /etc/httpd/conf/codomains.conf

    at the end of the file. Save the file.


2. Create the file /etc/httpd/conf/codomains.conf. For each additional
domain you would like to have pointed to an existing account, put the
following into the codomains.conf:

        <VirtualHost IP.NUMBER.GOES.HERE>
        ServerName www.domain2.com
        ServerAlias domain2.com
        DocumentRoot /home/sites/siteX/web
        </VirtualHost>

whereas domain2.com is the domain you want to point to the Account siteX.
Please note the following:

i) you cannot easily use "www.main-domain.com" instead of "siteX". This is a
problem with symbolic links.
ii) you can also easily add further domains pointing to the same location by
adding further "ServerAlias" directives.
iii) you can also have the domains2.com point to a user's web directory,
e.g. /home/sites/siteX/user/someuser/web
iv) sending mail to this domain2.com does NOT work. If you would like this,
you need further changes to config files.


3. For each domain, create two A records in your dns server:

    domain2.com                   ->       ip
    www.domain2.com          ->       ip

You can use the same ip for the domain of the virtual site as well as for
the additional domain(s).



> - Is it possible to create a root user for a virtual host? A user that
goes
> to his root dir, instead of /users/username ? So he immediately can upload
> his _main_ index files?

You could do this, but this could mess up the cobalt gui. When removing this
user, the whole /web directory would be removed. It would be better to
instruct your site admins to go to /web manually. Most ftp programs support
to enter a start path that automatically will be applied when logging in.



> - Is it possible to view a created virtual domain, before it has it's own
> domainname? e.g. http://123.456.789.999/domainname/ ? Now you can only
view
> the webpage when the domainname is activated.

The easiest way would be to have a dedicated ip for the new virtual site.
The site then can be viewed via this ip. If you do not have an extra ip, it
could become a problem. BUT please note that I am not a linux guru. Perhaps
someone else in this list can help you.



Manuel
- manitu Webhosting -