• 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

Subdomain point to main domain subfolder

You seem to have a multitude of problems that aren't directly related to the subdomain setup.

To confirm... the commands don't issue any results they just exit once they are done. If you want to make sure that the command picked up the vhost.conf file, look inside the main domains /conf directory inside the httpd.include file and you should see a section specifically for the subdomain and inside that will be Include line that includes the vhost.conf file from the subdomain's conf folder.

Also... as I stated previously, the www displaying the default page is a configuration issue in Plesk and you need to tell plesk that it should also be accepting requests for www.subdomain.domain.com as well as subdomian.domain.com. This is above and beyond DNS and is actually related to the apache configuration itself.
 
I just think that PLESK is not intuitive and requires the user to laboriously tell it to do things which are common sense (and automated in CPANEL). I was not aware that I needed to do a third stage and tell the subdomain to behave like any other URL on the net.

So everyone using PLESK 9 has to go through this stress just to have subdomain functioning and contained within the domain? This does seem rather unreasonable and convoluted.

you need to tell plesk that it should also be accepting requests for www.subdomain.domain.com

I will search the internet (yet again grrr) to see what I am now supposed to be doing with Apache. There is no option in Plesk 9.5 to simply switch this on - which is there for the domain oddly but not subdomains!


I do appreciate all your emails and the time you have given me on this.
 
Last edited by a moderator:
Plesk != cPanel/WHM While they appear to perform the same functionality they don't do it the same way. (I use both and have no problem making either do what I want.) The problem really lies in the way you are approaching Plesk. You want Plesk to be cPanel. If you want cPanel, then I suggest using a VPS provider that actually offers cPanel.

As I said before, the problem is with your config. Plesk is flexible enough to work around the problem. You will need to edit the vhost.conf you created for the subdomain earlier and add:

Code:
ServerAlias www.subdomain.domain.com

as another line outside of the <Directory> declarations.

I am not advocating Plesk at all, it has its own set of problems which I won't get into.
 
Wow this thread is getting long!

Thanks again for all your help.

I decided to start from scratch this morning and deleted the previous subdomain.

So here's where I am now at:

1) created the subdomain and the DNS settings

2) deleted the subdomain httpdocs folder

3) created the vconf file with the settings of
<Directory /var/www/vhosts/MyDomain/subdomains/MySubdomainNAme/httpdocs>
php_admin_value open_basedir "/var/www/vhosts/MyDomain:/tmp"
Options FollowSymLinks
</Directory>
<Directory /var/www/vhosts/MyDomain/subdomains/MySubdomainNAme>
Options FollowSymLinks
</Directory>
ServerAlias www.MySubdomainNAme.MyDomain


4) SSH connection to server then executed following commands
ln -s /var/www/vhosts/MyDomain/httpdocs/MySubdomain/ /var/www/vhosts/MyDomain/subdomains/MySubdomain/httpdocs
THEN
/usr/local/psa/admin/bin/websrvmng


5) went to the URL - YES, it's found the content which is currently sitting under httpdocs/MyDomain/MySubdomain and displaying this as http://www.MySubdomain/MyDomain.com BUT its still not working for http://MySubdomain/Mydomain.com. This no longer the Plesk Welcome Page though - it's just a "server not found".

Q: Have I not set the server alias properly or is there something I have missed above?
 
Last edited by a moderator:
Hurrah - I just checked the links and they are both working with the correct content! Maybe I just needed to wait for the server to catch up? Who knows but I've done nothing and it's all now working!

THANK YOU SO MUCH FOR ALL YOUR HELP - you are a Plesk legend!
 
Back
Top