Question

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

Posted August 28, 2020 421 views
NginxUbuntu 18.04Laravel

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

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

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

by Erin Glass
Nginx is one of the most popular web servers in the world and is responsible for hosting some of the largest and highest-traffic sites on the internet. In this guide, we'll discuss how to get Nginx installed on your Ubuntu 20.04 server.