Report this

What is the reason for this report?

Ho I Can make my web server accessible from domain, but also on direct IP

Posted on August 28, 2020
Cak Nurahman

By Cak Nurahman

Masse

Hi guys, is possible to make my webserver accessible using 1 domain but, also can accessible also using IP address (example 114.232.232.13), how I accomplished that



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Hi @caknoris696:

It is possible to make your website accessible using your domain and IP. You just need to declare both your domain and IP in the server block of your Nginx configuration file as below:

server {

    server_name  your_domain  114.232.232.13;

}

You can read the following tutorial, especially Step 5 – Setting Up Server Blocks, for more details:

https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-20-04

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.