Vhost alias

Discussion in 'ISPConfig 3 Priority Support' started by Solipse, Jul 8, 2014.

  1. Solipse

    Solipse New Member

    Hello,

    I've been using aliases inside vhosts in the case of websites composed of multiple parts like a blog, a wiki, a collaborative pad, etc. I feel it cleaner to use an alias to avoid physicaly nesting the folders of those projects one inside of another. This way they are easier to manage, export, update...

    It would mean being able to set a subfolder of a domain to a directory different than the default document root /var/www/client/website/web. It usually looks like :
    Code:
    Alias /blog "/var/www/client/website/blog"
    
        <Directory "/var/www/client/website/blog">        
            allow from all
            order allow,deny
            AllowOverride All
        </Directory>
    Is this already feasible inside ISPconfig ? Like using appropriate apache directive ?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Aliases are normally not used in ispconfig for websites. But you should be able to do this by adding your custom config in the apache directives field of the website. Also you dont have to nest the folders, just specify a new docroot for the site in the apache directives field like /var/www/client/website/web/mainsite

    Personally I separate sites by using different websites in ispconfig with subdomains, this adds also a security layer between the blog, shop, etc. parts of a site, so a hack of a blog will not affect any customer data in the shop.
     
  3. Solipse

    Solipse New Member

    Thank you Till,

    So Apache directives are basically lines introduced in the vhost file ?

    About your second solution, how to configure the subfolder of the domain domain.com/othersite/ when creating a subdomain. By doing a redirection I feel like it will contradict the base website.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes. This field exists to allow all kinds of customizations of the apache configuration that are directly included into the vhost of that website.

    I mostly use subdomains when I use different software types, not folders.
     
  5. Solipse

    Solipse New Member

    Ok, all clear to me now. Thanks.
     

Share This Page