Report this

What is the reason for this report?

nginx - keeping default page with other websites on server ip

Posted on January 3, 2014

Hello all, Using ubuntu 12.04 + varnish + nginx +apc I have been able to correctly set up multiple websites, but when I try to add default ip page (welcome to nginx), it breaks something, i mean either it takes example1.com or others to default page ,

When i remove it(default server block), everything works except when i open ip it takes me to 1 of my domain. So my question is it compulsory to remove that block? I want my server ip to show nginx default page,

primarily to ensure no ip canonicalization, I have added all blocks in single default file so is that symbolic link also required each time for every domain added? (sudo ln -s /etc/nginx/sites-available/wordpress /etc/nginx/sites-enabled/wordpress) because mine are working without adding that link, except the default added already.

Also is it better to create different file for every server block or one file is good to go? Thanks



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!

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.

ok, <br>found the problem, <br>hadn’t added server block for www. <br>thanks

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.