• 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!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    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.

vhost setup

maclonghorn

New Pleskian
I'm trying to create a subdomain that points to the primary domain so that the subdomain is essentially an alias for www. So then these two are the same:

www.mydomain.com
test.mydomain.com

I think I would create a vhost file in the conf dir of my primary domain dir but I'm not sure. I tried this already and it worked for awhile, but then I started getting errors when Apache would try to restart, and thus would not start at all.

What is the format/requirements for a vhost file? I basically copied the httpd.include file to vhost file and changed the ServerAlias directive.

1. Can I setup the domains in this way?
2. How would I do this? (I don't want to create a subdomain in Plesk b/c that would be different code)

Thanks.
 
what don't you insert only the ServerAlias directive in the subdomain - > test -> conf/ vhost.conf
and run :

PLESK_PRODUCT_ROOT_DIR/admin/bin/websrvmng -v -a
or
PLESK_PRODUCT_ROOT_DIR/admin/sbin/websrvmng -u -vhost-name=test

then
/etc/init.d/apache2 restart

I was told it runs well ! ....

(for me, PLESK_PRODUCT_ROOT_DIR = /usr/local/psa )
 
maclonghorn: it would be much more simple, if you'd use domain aliases feature which was introduced around 8.0. Then, you don't need to create subdomain or any acrobatics with vhost.conf files.
 
ib1984:
i believe the domain alias is for a 2nd level domain, for example, for mydomain.com, it would create an alias of mydomainalias.com. Correct?
 
Back
Top