nginx: [emerg] unknown directive

An error that occurs when checking the nginx configuration.

When entering the command:

The error looks like this:

nginx: [emerg] unknown directive “” in / etc / nginx / sites-enabled / ploshadka: 2
nginx: configuration file /etc/nginx/nginx.conf test failed

The error could be related to EOL spaces. When copying a configuration, invisible whitespace characters are inserted. To avoid this, you can copy through a special editor. For example, via sublime text.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *