facing error while installing nginx on ubuntu?

when i run command sudo nginx -t then im getting this error

ubuntu nginx: [emerg] unknown directive “” in /etc/nginx/sites-enabled/default:48

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 @sharsh2106,

The [emerg] unknown directive error message, means that you’ve added a line that doesn’t mean anything to Nginx in /etc/nginx/sites-enabled/default on line 48.

What I’ll suggest you to do is open the file on this line and see what is there, maybe there is a typo.

If you are not sure, you can post the content of the file here and we’ll try to further advise you.