Nginx redirect me to a real site web not my virtual site

Hi , it te first time that i use nginx ! so i’m asking why if i add a virtual domain name in /etc/host for exemple and i follow this tuto but it doesn’t work :( cna someone help me ??

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi yannek !! no a did not open the browser before !! and it’s the same think … even when i test a domaine name inexsisted for exemple it doesn’t work :(


If you had opened in your web browser before you modified your /etc/hosts file, then it is very likely that your web browser cached site’s content and respond with such cache content to each next request sent to What I can suggest is to clear browser’s cache and try again then.

Let us know if it helps.