• 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.

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