TransWikia.com

how to fix unknown directive error in nginx?

Super User Asked by suikerchiller on November 20, 2021

I’m currently getting the following error with nginx:

$ sudo nginx -t
nginx: [emerg] unknown directive "sd#" in /etc/nginx/sites-enabled/default.save:27
nginx: configuration file /etc/nginx/nginx.conf test failed

As a result none of my reverse proxies work anymore. Anyone an idea what’s causing this and how I can fix it?

For the record: I made a small change in the config (copy pasted code some code in), but reverted back again after I got the error. At the time my reverse proxies where still functioning, but after a server reboot they all stopped functioning (which makes sense). Any help would be great, thanks!

One Answer

Solved it, stupidly misread the error output. Apparently I duplicated the default file into default.save. There also was a typo in the duplicated config, which was the "#sd". Removed default.save and everything works again :)

Answered by suikerchiller on November 20, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP