Problem with nginx configuration - second approach

Posted April 25, 2020 456 views

I was trying to deal with my problem which I wrote here:

Now I have that case:

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

  • When I put server_name 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 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;  # 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.

Submit an Answer
1 answer


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.