The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Virtual Directory Support under Apache?

Discussion in 'EasyApache' started by myce, Oct 11, 2006.

  1. myce

    myce Well-Known Member

    Joined:
    Oct 24, 2001
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    I have a client who hosts 186 websites on my server, and he wants to use some new software that requires I setup Virtual Directory Support under Apache in order to run it. Can someone please tell me what effect, if any, this will have on a WHM/cPanel server? And also, can someone tell me what I need to do to install this? I've searched all over, and this seems to be a topic with a lot of requests for "HOW TOs" but with very few replies. So, any help is appreciated.
     
  2. myce

    myce Well-Known Member

    Joined:
    Oct 24, 2001
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Ok, no replies, so I'll bump this back to the top in desperation! Has anyone sucessfully installed virtual directory support on a cPanel/WHM box? Does anyone have a clue what I'm even talking about? This is the TOUGHEST topic I have ever researched; no one offers any information about this, here or anywhere (i.e. other forums!). Any help is appreciated; REALLY! :confused:
     
  3. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
  4. RickG

    RickG Well-Known Member

    Joined:
    Feb 28, 2005
    Messages:
    238
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    North Carolina
    Can you find out the objective of your client and/or what the software accomplishes?

    I'm not certain you (or the client) is using the correct terminoligy. "Virtual Directory" is sometimes used when discussing Apache under a MAC OS.

    In our Linux environment, it is simply either an alias or a standard virtual host container in your httpd.conf

    If you can get some more information maybe we can help.
     
  5. myce

    myce Well-Known Member

    Joined:
    Oct 24, 2001
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Virtual Directory Support "enabled" for PHP, I am told, is the outcome of setting up Virtual Directory Support under Apache. I'm not sure my terminology is correct. I've looked at scores of links to "Virtual Directory Support under PHP" but none ever tell you "HOW" to set it up.

    FYI, I tried setting up something called "wildcard (catch-all) subdomains" 6 months ago that I think may be what they want. It required setting up:

    NS settings:
    *.yourdomain.com IN CNAME yourdomain.com.

    Apache server settings:
    ServerName yourdomain.com
    ServerAlias *.yourdomain.com

    It also required this slug of code in the .htaccess file:

    Options +FollowSymlinks
    RewriteEngine On
    RewriteRule ^manage(.*)$ - [L]
    RewriteRule ^batch(.*)$ - [L]
    RewriteRule ^templates(.*)$ - [L]
    RewriteRule ^favicon\.ico(.*)$ - [L]
    RewriteRule ^robots\.txt$ - [L]
    RewriteRule ^plain\.php$ - [L]
    RewriteRule ^(.*)$ index.php [L]

    This did not work and play well with cPanel; as I remember, it required manual changes everytime a new domain was added to force the Apache settings to the end of the httpd.conf file and to add the CNAME record for NS. But, the objective was to create "virtual" domains and subdirectories from data stored in a database. When I logged onto the domain using FTP, there were no physical directories below root, but there were literally thousands of "virtual" domains that could be viewed via your browser. The purpose was to create dynamic content on domains that don't really exist in the physical realm. Can you spell "A-D-S-E-N-S-E?" ;)
     
    #5 myce, Oct 18, 2006
    Last edited: Oct 18, 2006
  6. fdg

    fdg Registered

    Joined:
    Jun 5, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I set up virtual directories for every site using IIS. My sites are PHP, so I'd like to switch to Apache. But I need to determine the answer to this question as well.

    Suppose you have a folder called "pages", which resides above the root directory of your site. For instance:

    Your site root: /home/sitedirectory/siteroot/index.hml
    Your pages: /home/sitedirectory/pages/

    In this case, you could could configure the IIS server to call your pages (above the root directory) via http like this:

    http://www.example_com/pages/somepage.html

    Notice that the pages directory doesn't really exist below the site root. However, creating a virtual directory will allow you to do this.

    I think in the Apache world this is handled with symlinks... is this correct?
     
  7. bashar

    bashar Registered

    Joined:
    May 11, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    for apache, you can use alias or location directives
     
Loading...

Share This Page