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

redirection *.domain problem

isabelleR

New Pleskian
I have some subdomains configured in plesk, and everything is working just fine.

Now I need to redirect people that access to any other subdomain (except the ones configured in plesk) to a different default directory.

For example http://xxx.mydomain.com to /var/www/vhosts/mydomain.com/httpdocs/default.

Ive tried to create a wildcard, with the code listed bellow, but it only works if I paste it to the end of http.include, which is discarded after any other plesk change.

If I use the vhost.conf as suggested , I get errors, because the include line at http.include is inside the first and lead me to problems with the others subdomains.


<VirtualHost xxx:80>
ServerName mydomain.com:80
ServerAlias *.mydomain.com
DocumentRoot /var/www/vhosts/mydomain.com/httpdocs/default
CustomLog /var/www/vhosts/mydomain.com/statistics/logs/access_log plesklog
ErrorLog /var/www/vhosts/mydomain.com/statistics/logs/error_log
</VirtualHost>
Is there any other way to do this ? Am I doing something wrong ?
 
Back
Top