Current time: 12-23-2024, 08:37 PM Hello There, Guest! (LoginRegister)


Post Reply 
how can I point a subdoman to a subdir
Author Message
stapow Offline


Posts: 1
Joined: Aug 2009
Reputation: 0
Post: #1
Wink how can I point a subdoman to a subdir
In Default Configure that xxx.aaa.com maybe point to /aaa_com_root/xxx/htdocs.
aaa.com point to /aaa_com_root/htdocs
Can I point xxx.aaa.com to /aaa_com_root/htdocs/xxx
where is no /htdocs in subdomain's docs.
I just want subdomain point to main domains subdirs.
Can I?
(This post was last modified: 08-20-2009 10:49 PM by stapow.)
08-20-2009 10:46 PM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #2
RE: how can I point a subdoman to a subdir
maybe you can set another documentroot in the right file in /etc/apache2/ispcp/sub.domain.tld.conf ...

Does this work?

/J
08-21-2009 08:53 AM
Visit this user's website Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #3
RE: how can I point a subdoman to a subdir
You can't. The easiest solution is to point it to another folder, and after it's directory structure is created, just login though ssh, remove the subdomain's htdocs folder and create a symlink pointing to the main domain's htdocs folder. Done Smile
08-21-2009 04:01 PM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #4
RE: how can I point a subdoman to a subdir
My version works for me, you also have to copy the Directory-Block...:

I put this into the apache2/ispcp/sub1.domain2.tld.conf

Code:
DocumentRoot    /var/www/virtual/domain2.tld/htdocs/sub1

    <Directory /var/www/virtual/domain2.tld/htdocs/sub1>
        # httpd sub entry PHP support BEGIN.
            <IfModule mod_php5.c>
                php_admin_flag engine off
            </IfModule>
            <IfModule mod_fastcgi.c>
                RemoveHandler .php
                RemoveType .php
            </IfModule>
            <IfModule mod_fcgid.c>
                RemoveHandler .php
                RemoveType .php
            </IfModule>
        # httpd sub entry PHP support END.
        Options -Indexes Includes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>

This works..

/J
08-21-2009 06:43 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)