• 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

vhost.conf with ServerAlias but no redirect

C

carnalito

Guest
Hi there,

i have searched for an old Problem to use one webspace with several domainnames.

I found a solution in creating a vhost.conf with the ServerAlias Directive. I have loaded the new config via:
/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=domain.com
Restarted apache and checked the domain...

No redirection, just the Placeholder index.html of the domain.com webspace.

Any help would be appreciated !

Regards

Carnalito
 
You should post what exactly you have put into the vhost.conf file so others can see if there are any changes which need to be made..

Also, have you pointed the 2nd domain to the main domain's IP?

Personally, I use the following command:

/usr/local/psa/admin/bin/websrvmng -u --vhost-name=domain.com

some of their options don't always work properly.

Have you uploaded an index file to the main domain's docroot?
 
Try to answer correctly, i want to point domain.com to domain.de wich is the maindomain:
You should post what exactly you have put into the vhost.conf file...
ServerAlias www.domain.de
ServerAlias domain.de

Also, have you pointed the 2nd domain to the main domain's IP?
Yes it do, the PlaceHolderIndexFile from Plesk is shown.

Personally, I use the following command:
/usr/local/psa/admin/bin/websrvmng -u --vhost-name=domain.com
I have tried this also with the same result.

Have you uploaded an index file to the main domain's docroot?
No, i created a virtual hosting with webspace and i think the page is created automatically ?!

Hope to be helped !

Thanks

carnalito
 
After trying all different stuff i found the fault (dumb carnalito):

I have done this all in the wrong place. I placed the vhost.conf in the webspace of the domain wich should be redirected.
But in real life the 'ServerAlias' Directive should be placed in the webspace of the target-domain.

I posted this just in case someone also failed.

Regards

Carnalito
 
Back
Top