• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

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