Author Topic: I change server IP adress and every website stop working.  (Read 5354 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
I change server IP adress and every website stop working.
« on: March 29, 2022, 01:50:58 AM »
Hello,
I had to change my ISP,
I changed the IP, after which everything just stopped working.
None of the sites open.
When I try to open any of the sites, it sends me directly to the CWP sample page. Like does not redirect to correct folder where website is.

The certificates also stopped working.
I got this error for SSL: After check.
The domain name does not match the certificate common name or SAN!

I tried everything and nothing works.
Do I need to rebuild all the sites now?

If anyone has any idea how to fix this problem please direct me.

Kind Regards

Offline
****
Re: I change server IP adress and every website stop working.
« Reply #1 on: March 29, 2022, 02:05:12 AM »
You need to rebuild all of the Config files in CWP
Google Hangouts:  rcschaff82@gmail.com

Offline
*
Re: I change server IP adress and every website stop working.
« Reply #2 on: March 29, 2022, 02:32:24 AM »
 Thank you for the answer.
Now i wonder from where i must start this ?
I don't have much of experience.
Please point me from where to start.

I ask because I do not want to make an irreparable mistake.
there are so many files that i just don't know where to start.
If there is a guide somewhere to read it will be very helpful.
I didn't even find a video on YouTube how to do it right.

Kind Regards

Offline
****
Re: I change server IP adress and every website stop working.
« Reply #3 on: March 29, 2022, 02:57:32 AM »
To Start, Log into CWP Admin.
First go here:
admin/index.php?module=ip_manager

Make sure the NEw IP is assigned

Then

admin/index.php?module=settings

Set the shared IP to the new IP

Then

/admin/index.php?module=WebServers_conf

Check Rebuild all webservers on save, and click save.

If you have any sites that use an individual config, they will need to be rebuilt as well:
admin/index.php?module=WebServers_domain



Now.  If you have removed the Old IP (Or plan to), You will have to rebuild your mailservers as well.  Everything on your system is tied to the original IP (especially SSL based software).  So we need to know if you are keeping the old IP, or removing it.  But the initial step above will get your started.
Google Hangouts:  rcschaff82@gmail.com

Offline
*
Re: I change server IP adress and every website stop working.
« Reply #4 on: March 29, 2022, 03:33:18 AM »
Hello,
Again thank you for the answer.
I done everything you said. And its the same as before.
I share here 2 of my websites. They both redirect to test CWP pages. They worked fine before i change the IP.

https://bulgrand.com/
https://sellernet.net/

And SSL are issue too.
For https://bulgrand.com/ i delete old SSL and add new one. No changes too.
That is the problem.

I'm sorry about bother you with my problem.

kind Regards

Offline
****
Re: I change server IP adress and every website stop working.
« Reply #5 on: March 29, 2022, 03:49:18 AM »
I see that you use remote DNS for your domains.  Did you update the A records for the domains to point to the new ip?
Google Hangouts:  rcschaff82@gmail.com

Offline
*
Re: I change server IP adress and every website stop working.
« Reply #6 on: March 29, 2022, 04:08:33 AM »
Yes, i did that before even start on the server.
This is the domain config from where i buy the domain name.

https://gyazo.com/01087edf6c5b38b2d605e7de669ed045

New ip point to the domain and resolve.
As i said i did try everything..

Offline
****
Re: I change server IP adress and every website stop working.
« Reply #7 on: March 29, 2022, 04:26:13 AM »
Can you post one of the config files from

If Nginx: /etc/nginx/conf.d/vhosts
if apache: /usr/local/apache/conf.d/vhosts
Google Hangouts:  rcschaff82@gmail.com

Offline
*
Re: I change server IP adress and every website stop working.
« Reply #8 on: March 29, 2022, 04:52:01 AM »

Which file you need to see ?
https://gyazo.com/b562e42dfc303fc6ed51ccf0f4982245
I post here bulgrand.conf

I see here the old ip.
...........................................................

server {
        listen 87.121.167.48:80;
        server_name bulgrand  www.bulgrand;
        root /home/bulgrand/public_html;
        index index.php index.html index.htm;
        access_log /usr/local/apache/domlogs/bulgrand.bytes bytes;
        access_log /usr/local/apache/domlogs/bulgrand.log combined;
        error_log /usr/local/apache/domlogs/bulgrand.error.log error;

        location / {

                location ~.*\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
                        expires max;
                }

                location ~ [^/]\.php(/|$) {
                        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                        if (!-f $document_root$fastcgi_script_name) {
                                return  404;
                        }

                        fastcgi_pass    unix:/opt/alt/php-fpm74/usr/var/sockets/bulgrand.sock;
                        fastcgi_index   index.php;
                        include         /etc/nginx/fastcgi_params;
                }

        }

        location ~* "/\.(htaccess|htpasswd)$" {deny all;return 404;}

        disable_symlinks if_not_owner from=/home/bulgrand/public_html;

        location /.well-known/acme-challenge {
                default_type "text/plain";
                alias /usr/local/apache/autossl_tmp/.well-known/acme-challenge;
        }

        location /.well-known/pki-validation {
                default_type "text/plain";
                alias /usr/local/apache/autossl_tmp/.well-known/acme-challenge;
        }
}

server {
        listen 87.121.167.48:80;
        server_name webmail.bulgrand;

        access_log /usr/local/apache/domlogs/bulgrand.bytes bytes;


Offline
****
Re: I change server IP adress and every website stop working.
« Reply #9 on: March 29, 2022, 05:26:01 AM »
is 87.121.167.48 still listed as an IP in CWP.  If it is, remove it, and try rebuilding vhosts again
Google Hangouts:  rcschaff82@gmail.com

Offline
*
Re: I change server IP adress and every website stop working.
« Reply #10 on: March 29, 2022, 05:38:06 AM »
Well i did change and rebuild and its same again.

Can i sent you private PM with login and pass so you can check if you have time ?
Maybe i did mistake somewhere...

Kind Regards

Offline
****
Re: I change server IP adress and every website stop working.
« Reply #11 on: March 29, 2022, 06:10:14 AM »
That's fine.
Google Hangouts:  rcschaff82@gmail.com