• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Alias with vhost.conf

H

HuwW

Guest
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
 
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
 
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?
 
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?
 
Back
Top