By tuliokkj
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?
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!
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.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.