Page 1 of 1

How can I change a web domain?

Posted: Thu Oct 01, 2015 1:42 pm
by weirdaljr
Hello,

I have a site running on Vesta for a year that was originally established as a subdomain (vps.domain.com), and when the domain was migrated nearly a year ago it needed to be switched from the subdomain to the root domain and since I didn't see a was in Vesta to do this I just added the domain as a alias of the subdomain.

That worked mostly, even though it seemed like a wonky workaround I didn't have any major issues until now. I added a SSL certificate, and it seems it is not working because of the face the cert is not for the subdomain.

So how can I manually change the vps.domain.com to domain.com in Vesta? I tried to help myself, but I was not clear on where Vesta stored this data. Is it in a DB I can change, or is their some other way from SSH?

Re: How can I change a web domain?

Posted: Wed Oct 28, 2015 10:31 pm
by Govo
Hi
Take a look at the config files.
You will need to change the apache config files and the niginx

More on them in vestacp docs

Cheers
Govo

Re: How can I change a web domain?

Posted: Thu Oct 29, 2015 9:36 am
by mach
you can change it from the panel in vestacp ? why the hell you need the config file ????

Re: How can I change a web domain?

Posted: Thu Oct 29, 2015 9:58 am
by tjebbeke
mach wrote:you can change it from the panel in vestacp ? why the hell you need the config file ????
You can't edit the domain name in the control panel.


There is no simple way to do this quickly :(
But you can try to create domain.com. Then you move the files from /home/username/web/vps.domain.com/public_html to /home/username/domain.com/public_html

Re: How can I change a web domain?

Posted: Thu Oct 29, 2015 12:32 pm
by mike08
Yeah you can do something like

Code: Select all

cp -r /home/username/web/subdomain.domain.tld/public_html/* /home/username/web/domain.tld/public_html/
It would be faster to move your files from one dir to another, btw you have to add the web domain before moving or copying your site.