Addon Domains

Pretty self explainatory. Is there something I’m missing to do this? Basically just want to add an additional domain to a users account.

-CJ

If you want one user to have more than one seperate domain then you need to give them a second account or a reseller account. If you want multiple domains to point to the same place go in to SiteWorx for the user and add a Pointer Domain.

Why can’t I just have a domain point to a folder in a users account a-la cPanel? This is such a trivial feature, why doesn’t Interworx have it? :frowning:

-CJ

They are adding the feature. I don’t know why it wasn’t a 1.0 feature, but they have a lot of other things they are focusing on (Not to say they are letting this slip by, because the aren’t). Why have another panel on the market that is the same as everything else? IWorx will have uniuqe features other panel’s won’t. Personally, I think its important that they establish what is uniuqe about InterWorx before copying the same features everyone else has done to death over and over.

All that said, you can do that if you want. Its a simple task of adding a pointer domain, then adding rewrite rules in a .htaccess for the account. That way, you can fake multiple domains support. This is pretty much how IWorx subdomains work.

How do I go about using the .htaccess method?

First, add the pointer domain. Then, create a .htaccess file in the site’s root with the following contents:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^.*domain.tld$ [NC]
RewriteRule ^(.*?)/?(.*)$ %{DOCUMENT_ROOT}/$1/$2 [L]

Disclaimer: I’m tired and sunburnt. I didn’t test that.

This is somewhat crude. You’ll need to change domain.tld to the real domain for the account. That rule will bail out if something for the real domain is requested. Then it assumes everything else is under /username/domain.tld/html/faked_domain/content.ext . You should be able to add as many domains as you like at that point. Just create new subdirectories of the html directory.

you may also be able to do this manually by copying the virtualhost conriguration file, rennaming it amd editing it to point to the new location – DO NOT EDIT THE SUEXEC ENTRY. Then adding the dns zone manually. It might work for the website only, but I have never tested this either.

Multiple domains per account and a rework of the subdomain/pointer domain system are on the to do list.

http://interworx.info/forums/showpost.php?p=3597&postcount=11

I’ve followed InterWorx since v1.3 and all I can say is that for the most part their choices as to what to add have been on the mark. They don’t aim to copy cPanel or Plesk but rather to be better than cPanel and Plesk. This includes a certain amount of inovation on their part and a certain amount.

Chris once told me that their goal was to include the imporatnt features of the other panels only do them better. From where I’m sitting they’ve done that in spaids (especially the 1.7- 2.0 releases). Give it time, they will come through :slight_smile:

Okay I tool a closer look at the virtualhost conf file /etc/httpd/conf.d/mysite.com.conf and this is a bit more complicated than I origianlly thought so unless you are very up on apache I’m not sure I’d try it.

I wouldn’t advise changing / duplicating VHOST entries. These are IWorx’s to clobber. IWorx won’t touch your .htaccess files (unless you go messing around in FileMan) so the .htaccess method is safer in terms of reliability.

Hey,

Has the code for the .htaccess file been tested?

If so I dont really see how it works, I dont see where you tell it what folder to look into and which pointer domain goes to what folder.

If anyone knows let me know ASAP, cuz support can’t help me since its not in the CP native and this is the only thread I see about it.

Oh also, can this work with more then one pointer?

I believe this will do what you want:

<--------.htaccess-----------

RewriteEngine On
Options +FollowSymlinks
RewriteBase /

Redirect www.site1.tld

RewriteCond %{HTTP_HOST} www.site1.tld$
RewriteCond %{REQUEST_URI} !site1/
RewriteRule ^(.*)$ site1/$1

Redirect www.site2.tld

RewriteCond %{HTTP_HOST} www.site2.tld$
RewriteCond %{REQUEST_URI} !site2/
RewriteRule ^(.*)$ site2/$1

Redirect www.site3.tld

RewriteCond %{HTTP_HOST} www.site3.tld$
RewriteCond %{REQUEST_URI} !site3/
RewriteRule ^(.*)$ site3/$1

---------------------------->

The above .htaccess will set doc root to subfolders “site1”, “site2” or “site3” respectively.

-tsl-