• 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

Problems with vhost.conf

Peter-

Basic Pleskian
Hello

This is my first post, hopefully it's in the right section.

I got a server 2 weeks ago, everything was fine until it stopped being fine. My main problem now, after I had to remove all subscriptiond due to some error (server fault I'd say) in apache configuration(s) is that from time to time, parallels is rewriting the configuration file for all my domains, putting this:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://domain.com$1 [L,R=301]
</IfModule>

Why would anyone put that in a default config file?? Is there a standard that I'm not aware of?! Where can I change this template to be able to re-use the www cname?! I found a couple instructions on how to write to vhost.conf and vhost_ssl.conf, but after reconfiguring the domain, the redirection is back there and, since the include is AFTER it, my vhost.conf configuration is basically ignored.

Thanks!
 
Hi,

just change your hosting settings for your domain as seen in the attached screenshot.
You are able to choose to rewrite all domain.tld to www.domain.tld or vice versa or to none. So www.domain.tld and domain.tld will be handled as different domains.

:)

www-domain hosting settings.png
 
Hey

Thanks for replying.

Unfortunately I don't have that option in my settings.

I went to subscriptions, selected a domain, clicked on the general tab but it isn't there.

Am I looking in the wrong place?!

Thanks!
 
Found it. It was under "scripting and security".

Thanks a lot!

I lost 2 days of my life because of this and was about to change the domainVirtualhost.php file :)
 
Last edited:
Thanks GunFood and Peter. I have been stressing with this same issue for 3 days now ( and its weekend aswell) before I got to this post.

I really have NO IDEA why I did not see this option.
 
Back
Top