1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Alias with vhost.conf

Discussion in 'Plesk 9.x for Linux Issues, Fixes, How-To' started by HuwW, Feb 23, 2010.

  1. HuwW

    HuwW Guest

    0
     
    Hi folks,

    I wonder if someone would be so kind as to help me out a bit. I've just bought a VPS which uses Plesk 9.3 running on Ubuntu (Webfusion host). Many of my websites use a Content Management System where the admin files are held in a 'master' directory. Under 'normal' Apache I just had to include an Alias directive in the httpd.conf file. For example:

    <VirtualHost *:80>
    ServerName www.mywebsite.net
    ServerAlias mywebsite.net
    Alias /admin /var/www/html/master/admin
    DocumentRoot /var/www/html/mywebsite
    </VirtualHost>

    The result of this would be that anyone visiting www.mywebsite.net/admin would be served files from /var/www/html/master/admin

    My question is how can I recreate this scenrio using the vhost.conf file? From what I can Google it looks like I need an Alias and a directive to alllow pages to be server from outside the domains file structure.

    All help appreciated.

    TIA

    Huw
     
  2. HuwW

    HuwW Guest

    0
     
    Anyone? Sorry but I'm pretty desperate to:

    a. - Know if this can be done

    b. - Get it implemented so I can move my websites to the new server.

    TIA

    Huw
     
  3. Matthew James

    Matthew James Basic Pleskian

    21
    73%
    Joined:
    Dec 7, 2009
    Messages:
    71
    Likes Received:
    1
    You should be able to do it that way, you have to create the vhost.conf in:

    /var/www/vhosts/domain/conf/vhost.conf

    I assume you already tried this?
     
  4. HuwW

    HuwW Guest

    0
     
    Yeah, I've tried - but without success. Now I'm not even sure if it can be done :-/

    Let me describe the issue in detail. A number of websites I host use a content management system I wrote. To make the thing maintainable I serve the code from a single account - only the config file is different for each user. In the past I used the Alias directive to achieve this. /admin for each users domain was Aliased to the CMS code. This also allowed me to reference the config file in each users document root - because the CMS files always appeared to be being served from the users domain.

    Still with me?

    Anyway, I can't find a workable way of doing this in a Plesk environment. I can't find a way to make 'Alias' work. When I put <VirtualHost> tags in the vhost.conf file I get a message that only one set of VirtualHost tags is allowed !! :-/

    Any ideas?
     
Loading...