• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

Subdomains Not Working

R

raygp

Guest
I am having a problem with subdomains. I have a domain that has an exclusive IP Address and has subdomains.

Trying to access the subdomain just sends them to the main domain.

in other words:
subdomain.domain.com goes to the same as
www.domain.com

I tried to restart apache and got this message.

Stopping httpd: [ OK ]
Starting httpd: [Wed Dec 29 09:51:44 2004] [warn] VirtualHost 65.100.113.1:80 overlaps with VirtualHost 65.100.113.1:80, the first has precedence, perhaps you need a NameVirtualHost directive
[ OK ]

I tried changing the address to a shared address, that didn't help!

Also all subdomains on my main shared ip address work fine.
Do I need to add a NameVirtualHost somewhere in the conf?
 
I had this same problem, it was fixed with "/usr/local/psa/admin/sbin/websrvmng -a -v" and restart httpd
 
I'm having this same problem with subdomains. I've run the webservmng command to rebuild the conf file and it does correct the problem so that my subdomain works.

However the primary domain then fails!

I've checked the httpd.conf file within the domain directory and it points to the correct file system folders on the server.

Any suggestions please?
 
Hi there!

First way:

1. create a subdomain SUB.DOMAIN.COM in Plesk control panel:

Domains -> DOMAIN.COM -> Subdomains

2. then create vhost.conf file in the subdomain's config directory: /home/httpd/vhosts/DOMAIN.COM/subdomains/SUB/conf/vhost.conf and put the following record inside:

---
DirectoryRoot /home/httpd/vhosts/DOMAIN.COM/httpdocs
---

3. run "/usr/local/psa/admin/sbin/websrvmng -a -v" to apply the changes.

Now then you access http://sub.domain.com you'll get the main domain's content.

Second way:

2. put the following directive in the /home/httpd/vhosts/DOMAIN.COM/subdomains/SUB/conf/vhost.conf file:

---
Redirect / http://domain.com
---

In this way when you access http://sub.domain.com you'll be redirected to http://domain.com.

I didn't test this way by myself however hope this helps.
 
Back
Top