-1

I have a website mywebsite1.com runing wordpress and hosted on digitalOcean droplet using LEMP (Nginx/php/mysql) on Ubunto server, am trying to duplicate the same site and use a new DNS mywebsite2.com to point to the new droplet IP, the problem is that the new DNS doesn't load and try to connect to the server then stop loading, here what I got on fireFox :

Unable to connect

on chrome :

This webpage is not available
ERR_CONNECTION_REFUSED

I am a Linux beginner, so for sure there's something missing .. here what I did step by step :

  • On my DNS provider I added A type mywebsite2.com to point to my new Droplet IP.
  • CNAME www.mywebsite2.com to point to mywebsite2.com
  • Updated my databasedump.sql with the new domain mywebsite2.com
  • Updated my config.php file (Wordpress)
  • Renamed my website directory :

/home/html/mywebsite1.com to /home/html/mywebsite2.com

ls -l 

enter image description here

  • Go to :

/etc/nginx/sites-available and renamed mywebsite1.com to mywebsite2.com and updated all the file

  • Delete the old symlink and create a new one for the new DNS, using this cmd :

sudo ln -s /etc/nginx/sites-available/mywebsite2.com /etc/nginx/sites-enabled/mywebsite2.com

  • Restart nginx ..

Note : I have an SSL certificate (Wildcard) that is working on mywebsite1.com, but recently bought a new one for mywebsite2.com and left the same config and put the new certification files (public & private)

Note 2 : Runing ping to mywebsite2.com is working and whois (cmd) give me the right DNS provider.

What am I missing please? Any suggestion is very welcome am trying to figure out what is wrong.

Thanks!

1 Answers1

1

This should really be a comment, but it's too long.

It's not really feasible for us to do basic problem solving for you. You need to work out which parts are working, piece by piece, then put them together. You'll learn a lot more that way than hoping someone on the internet can magic you an answer.

I'd first test that nginx can show it's default page, first with curl from the server, then with a web browser from remote. Next try with a custom static page in a new location, then that it can load phpinfo, then that it can load wordpress including the database. In there somewhere I'd test the database directly, and maybe a little custom php page to ensure php can talk to the database. Only last add https.

Given you can ping but not browse I guess it's firewall or nginx not set up right, but can't say more given what you've told us. This is really a "setting up a web server 101" type question, Google can answer most of those questions.

Tim
  • 30,383
  • 6
  • 47
  • 77