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
- 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!
Unless blocked by a firewall, it looks like your nginx is not presently running:
You can determine whether or not it’s running by running one of the following:
ps aux | fgrep nginx
, which should return at least 3 different lines (likely at least 4), andpgrep nginx
, which should return at least 3 numbers.Subsequently, I would look into the global
error_log
to see why nginx is not starting up when you start it (configuration issues would be reported in the global one, not the local one to the site specified within site’s configuration).