Current time: 11-25-2024, 04:07 PM Hello There, Guest! (LoginRegister)


Post Reply 
change default domain
Author Message
sakal Offline
Junior Member
*

Posts: 42
Joined: Mar 2010
Reputation: 0
Post: #1
change default domain
Hello all,

I just need to ask what i need to do if i want change hostname on my server.

I use ISPcp 1 month on my server on : old_domain.com
and after testing and now there is some running clients, so i need to change server name on : new_domain.com

What i have to do to change it?

I try just change server hostname and also change hostname in ispcp.conf
But when i do : perl ispcp-update
In config files i have back my : old_domain.com

Any help ???

Thanks
I did :

/etc/hostname <-- hostname
/etc/hosts <-- IP table + hostnames

then

# cp /etc/hostname /etc/mailname

Now you must open /etc/ispcp/ispcp.conf. There you must change the server_name and base_server_vhost.

Now, you can open phpmyadmin and log in as root.

Open the table server_ips. Change here the server name.

Then open /etc/postfix/main.cf

Change here myhostname and mydomain.

Now restart postfix and hostname.sh.

But thats not ALL , i dont realy know what else i have to do. Please help.
(This post was last modified: 03-17-2010 11:52 PM by sakal.)
03-17-2010 11:15 PM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #2
RE: change default domain
and do a "grep -r old_domain.com /etc" maybe you find some places to change the domain and or hostname...

/J
03-18-2010 09:48 PM
Visit this user's website Find all posts by this user Quote this message in a reply
sakal Offline
Junior Member
*

Posts: 42
Joined: Mar 2010
Reputation: 0
Post: #3
RE: change default domain
So there is no solution to change everything in one command or in some steps , i just have to search a replace all dates manually ?
03-18-2010 10:01 PM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #4
RE: change default domain
yep...

some of the initial files are only written during the first setup.

Check the 00_master.conf in the apache configs - then try again.

/J
03-19-2010 03:23 AM
Visit this user's website Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #5
RE: change default domain
The ispcp-update script uses /etc/ispcp/ispcp.old.conf as base configuration file. Make sure that you copy your /etc/ispcp.conf file over the former one so that your changes are not reverted during the update process.
03-19-2010 06:21 AM
Visit this user's website Find all posts by this user Quote this message in a reply
sakal Offline
Junior Member
*

Posts: 42
Joined: Mar 2010
Reputation: 0
Post: #6
RE: change default domain
Thanks for HELP to @ALL

Got one more question.

When i install ispcp i use for domain : cp.mydomain.com
now i want on : http://www.mydomain.com start my own page.

so i make new user : mydomain.com
and make index.html in virtual/mydomain/htdocs/

But always when i call http://www.mydomain.com i see control pannel , but i want see this pannel just in ttp://cp.mydomain.com

not in : http://*.mydomain.com

Can some guru help my how to fix this issue ?

Thanks for HELP
(This post was last modified: 03-20-2010 05:18 AM by sakal.)
03-20-2010 05:17 AM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #7
RE: change default domain
It should work as you want by default. Please post the output of "apache2ctl -S" so that we can see how are your virtualhosts defined...
03-20-2010 08:27 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Nuxwin
Unregistered

 
Post: #8
RE: change default domain
Hello ;

I confirm. I've tested on my server and it works like a charm

Best Regards ;
03-20-2010 02:48 PM
Quote this message in a reply
sakal Offline
Junior Member
*

Posts: 42
Joined: Mar 2010
Reputation: 0
Post: #9
RE: change default domain
@kilburn

VirtualHost configuration:
85.248.229.105:80 is a NameVirtualHost
default server cp.domain.com (/etc/apache2/sites-enabled/00_master.conf:31)
port 80 namevhost cp.domain.com (/etc/apache2/sites-enabled/00_master.conf:31)
port 80 namevhost webmail.cp.domain.com (/etc/apache2/sites-enabled/06-roundcube:1)
port 80 namevhost nagios.cp.domain.com (/etc/apache2/sites-enabled/nagios3.conf:5)
127.0.0.1:80 is a NameVirtualHost
default server localhost.localdomain (/etc/apache2/sites-enabled/01_awstats.conf:36)
port 80 namevhost localhost.localdomain (/etc/apache2/sites-enabled/01_awstats.conf:36)
Syntax OK

Thx
(This post was last modified: 04-16-2010 09:48 PM by sakal.)
03-20-2010 07:19 PM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #10
RE: change default domain
Quote:VirtualHost configuration:
85.248.229.105:80 is a NameVirtualHost
default server cp.itti.pro (/etc/apache2/sites-enabled/00_master.conf:31)
port 80 namevhost cp.itti.pro (/etc/apache2/sites-enabled/00_master.conf:31)
port 80 namevhost webmail.itti.pro (/etc/apache2/sites-enabled/06-roundcube:1)
port 80 namevhost nagios.itti.pro (/etc/apache2/sites-enabled/nagios3.conf:5)
127.0.0.1:80 is a NameVirtualHost
default server localhost.localdomain (/etc/apache2/sites-enabled/01_awstats.conf:36)
port 80 namevhost localhost.localdomain (/etc/apache2/sites-enabled/01_awstats.conf:36)
Syntax OK

As you can see, there is *no* VirtualHost being configured by /etc/apache2/sites-enabled/ispcp.conf, where the panel sets up user virtualhosts. Therefore, you are either missing the link "/etc/apache2/sites-enabled/ispcp.conf -> /etc/apache2/sites-available/ispcp.conf" or your panel has *not* setup your client domains. Are you sure that the domain status in the panel is "OK"?
03-21-2010 08:08 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)