• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

Subdomains issue

D

djason

Guest
Hi I have a question to make regarding the subdomains creation!!!!

I have created a subdomain via Plesk 8.4, but I cant visit my subdomains when I am typing www.subdomain.domain.tld, but i can see them when i type subdomain.domain.tld.

Can you help me on how to solve this???


Thank you in advance
 
I've made myself a bash scritp to cover that, but you have tu run it for every subdomain.

#!/bin/bash

#cd /var/www/vhosts/$2/subdomains/$1/conf

if !(grep -q "ServerAlias www.$1.$2" /var/www/vhosts/$2/subdomains/$1/conf/vhost.conf > /dev/null 2&>1)
then
echo ServerAlias www.$1.$2 >> /var/www/vhosts/$2/subdomains/$1/conf/vhost.conf
fi

/opt/psa/admin/bin/websrvmng --reconfigure-vhost --vhost-name=$2 > /dev/null 2&>1

/usr/local/psa/bin/dns.sh --add $2 -cname www.$1 -canonical $1.$2.

/usr/init.d/bind9 restart > /dev/null 2&>1

/usr/sbin/apache2ctl -k graceful > /dev/null 2&>1

echo Subdomain $1.$2 has been set up!


You use it like this (for forum.domain.com, name of file with above script: wwwdomain): ./wwwdomain forum domain.com
 
Thank you for your reply meto!!!

I ve done almost the same without writing a script, I made the changes into the conf file of the domain and it worked, but when I restarted the apache everything was changed again and became as it was before the changes that I made... isnt that strange?

Is this a bug of 8.4 version??

Thank you anyway I ll copy your script and I will see how it works.
 
It does for me :) Its not a bug its a FEATURE! :p Subdomains NEVER had www prefix included (as far as i remember, wich is PLESK 7.5 Reloaded).
 
Back
Top