Hello,
I was trying to deal with my problem which I wrote here:
https://www.digitalocean.com/community/questions/problem-with-configure-nginx-i-guess-to-cooperate-with-domain-and-not-show-ip-address

Now I have that case:

  • When I put server_name domain.com www.domain.com in nginx configuration file, I see only nginx start page but with my domain name:
    Image 1

  • When I put server_name domain.com www.domain.com ip_address in nginx configuration file, I see my webpage but with ip_address:
    Image 2

I think I’ve been trying everything and did everything in all guidelines. Here is my actual nginx content:

server {
    listen 80;
    server_name mydomain.com www.mydomain.com ip_address;

    location = /favicon.ico { access_log off; log_not_found off; }
    location /static/ {
        root /home/tuliokkj/my_project;
    }

    location /media/ {
        root /home/tuliokkj/my_project;
    }


location / {
        include proxy_params;
#        proxy_set_header Host karolkurek.pl;  # I tried with this line and without it
        proxy_set_header X-Real-IP $remote_addr;
        proxy_pass http://unix:/home/tuliokkj/my_project/portfolio.sock;
    }

}

Any ideas?

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.

×
1 answer

Hello,

What you could do is delete the default Nginx server block so that it does not cause such issues for you.

That way you would know that you only have 1 active server block and you would not see the Nginx welcome page.

Submit an Answer