Question

Redirecting from Domain Name

Posted October 1, 2021 114 views
Nginx

I’m having issues with the redirecting in my droplet. I can get onto my droplet through the IP address, but any form of my domain name doesn’t work. I’ve tried reinstalling Nginx and recreating the /etc/nginx/sites-available/default file but those don’t seem to work. Any help would be appreciated!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hello,

What I could suggest is to create a separate Nginx server block for your domain name. You can follow the steps here on how to do that:

https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-16-04

Also, if you are using WordPress, you might have to change your WordPress site and home URLs from your IP address to your domain name as described here:

https://www.digitalocean.com/community/questions/how-to-i-change-wordpress-url-on-ubuntu-droplet-but-not-lose-my-log-in

Let me know how it goes!
Regards,
Bobby

by Justin Ellingwood
When using the Nginx web server, server blocks (similar to the virtual hosts in Apache) can be used to encapsulate configuration details and host more than one domain off of a single server. In this guide, we'll discuss how to configure server blocks in Nginx on an Ubuntu 16.04 server.