PDA

View Full Version : Co-Domains Interesting Solution :)


PingBomb
27th February 2008, 10:19
Hi everyone. Here i have some problems with co-domains and they was that when create co-domain is not like sub domain :) and subdomain-users can't use co-domain properly. So what i do :)

1. create co-domain --- sub.example.com

2. create user --- sub (let say web1_sub)

3. reading ispconfig.org forum and use
(posting this in Apache Directives (Optional): )
RewriteEngine on
RewriteCond %{HTTP_HOST} ^sub.example.com [NC]
RewriteRule ^/(.*)$ /example/$1 [L]

4. Now to have access to folder "/example" witch is in folder root at domain example.com i just mount them.

mount --bind /var/www/web1/user/web1_sub/web /var/www/web1/web/sub

now the user web1_sub will have access and full control over sub.example.com and will no have problems.
I hope this will help to someone :)
REMEMBER: in different OS mount is different
Linux:
mount --bind.......
mount -o bind......
BSD:
mount_null ........
Solaris:
mount -f lofs ......

PS. Sorry for my bad english or if i write some words not correct.

till
27th February 2008, 10:23
And the easy and recommended solution is:

Create a new website with:

hostname: sub
domain: example.com

as every client in ISPConfig can have multiple websites.

Hans
27th February 2008, 11:36
Sometimes it is difficult to find a simple solution!!!

Hahahaha :)