Domain not working with nginx server setup

Posted April 17, 2020 6.7k views


I followed every steps from tutorial

I added dns to my domain provider,

  • ping to working
  • connecting to server using server ip from above tutorial working
  • added ufw rules But, when I type in chrome or firefox, it is just not responding at all. Could anyone help me to figure out what is the problem?

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
2 answers

Hi @choipaper,

There are a couple of things you’ll need to check. Make sure you have created a configuration file for your domain in the /etc/nginx/sites-available/

In there make sure you have the proper server block like so

server {
        listen 80;
        listen [::]:80;

        root /var/www/;
        index index.html index.htm index.nginx-debian.html;


        location / {
                try_files $uri $uri/ =404;

Notice that you’ll need to change

        root /var/www/;



To the proper path and domain respectfully.

Once you have updated your configuration file, make sure to run

sudo ln -s /etc/nginx/sites-available/ /etc/nginx/sites-enabled/

Again, remember to change your with the actual domain.

Lastly, check your Nginx configuration with

sudo nginx -t

If everything is okay restart nginx and everything should start working

service nginx restart


I have the same issue my domain reply but not open the web page ,
my setup is nginx and mariadb and wordpress any help please