VPS-ZPanel Issue hostname change

Basically I have a VPS setup, but I set the hostname incorrectly. I left it on for a while and everything was fine, installed zpanel etc. and it is now "web host" and everything was fine. Now I want to change the hostname so I can log into the hosting companies control panel for the server and change the hostname.

The original and new hostname is in the xxx.yyy.com format. So nothing happened and I could still get to the zpanel login page via the "old" hostname, although in the hosting companies control panel it said it had changed.

For ease of explanation, we'll say that my old name was xyz.example-domain.com and my new name was server.another-domain.com. Both domains are controlled by this zpanel installation.

Anyway. I removed the dns entry for "xyz" on the example domain and, as you would expect, if you go to xyz.example-domain.com, you get nothing. I created a dns A record for server.another-domain.com, but now all you get is the default apache page on your server. To enter the zpanel login you need an IP address.

So my question is, do I need to do something? It seems I need to change where this zpanel login page will be displayed so that it can be server.another-domain.com. I'm guessing there is some file somewhere that I need to change, but I don't know which one and "internet" doesn't really help as all I find is "change hostname in control panel hosting companies, "I did.

PS This is an apache 2 server running CentOS 6

+3


source to share


2 answers


Take a look at the Apache configuration located in /etc/httpd/conf/httpd.conf

. If you are going to run multiple domains from the same host, you need to set up virtual hosts. You will see a detailed explanation of these settings at the bottom of the config file.

Depending on where you placed your files, you need to set the DocumentRoot appropriately for each of your virtual hosts, and this will instruct Apache to look for files in the appropriate locations. By default, I believe it looks like a /var/www

.



NOTE. When changing the config file, you need to restart Apache or reload the config. You can do this by running one of the following commands (as root):

/etc/init.d/httpd restart
/etc/init.d/httpd reload

      

+1


source


Go to / etc / zpanel / panel /

rename: the index.phppanel.php (or any other name).

Then create index.php and leave it blank (or write a welcome message)



Finally, enter your zpanel like this: http: //www.yourIP/panel.php

Works great!

No need to change any port

0


source







All Articles