How to change the IP address of a server running on a Pi

webserver_issue

#1

Hey there everyone, basically as the title says, I moved recently and need to change the server IP address, but dont want to wipe the pi and lose everything thats on there, many gigs of data Id like to keep and not have to reupload and all.

Ive tried to change the IPs in the:
/etc/nginx/sites-available/default

Also changed a couple IPs in the: /var/www/owncloud/config/config.php

Changing those IP addresses hasn't worked, I havent tried much of anything else because I cant find my issue anywhere. When i try to type in its local ip address into my browser: "192.168.1.x" it redirects it to its old IP address and says it can not be reached. I have no clue as to why it is redirecting, this router has never been associated with that IP.

I am also totally new to this! Thanks!


#2

Hi,

Hasnt seemed to work yet

sorry this sentence contains zero information what issues you're facing when doing the changes you have posted.


#3

fixed it, hopefully thats better


#4

"Nothing worked" is even worse


#5

please explain what you mean, I changed the IPs in the files, they havent worked, I said above that what I did already


#6

Just can point you to:

http://www.catb.org/esr/faqs/smart-questions.html#beprecise


#7

Hows that? I gave as much detail as I can.


#8

You havn't provided anything describing your problem. Needed infos are:

  • What do you think should happen when changing these files
  • What "didn't work" when changing these

Edit Ok, your third edit is better now


#9

So, the only thing what could cause such a redirect within oC itself is the trusted_domains setting in your /config/config.php which needs to include your new IP Address.

Any other redirect is probably happening within your router or in a webserver config you haven't found yet.


#10