I have a nginx-proxy, I run a check on the configuration file, I get an error:

nginx: [emerg] directive in /etc/nginx/sites-enabled/%%%%%%.save:11 directive in / proc_pass
nginx: configuration file /etc/nginx/nginx.conf test failed

Why swears?


from comment:

server { listen 8083; server_name %%%%; proxy_ignore_client_abort on; access_log /var/log/nginx/bb/%%%%.log upstreamlog; error_log /var/log/nginx/bb/%%%%.log error; location / { proxy_pass 127.0.0.1:8091; } location /health-check/ { access_log off; return 200; } } 
  • Config do not show? - Andrew Hobbit
  • server {listen 8083; server_name bank.megafon.ru; proxy_ignore_client_abort on; access_log /var/log/nginx/bb/bb_megafon-access-megafon.log upstream; error_log /var/log/nginx/bb/bb_megafon-error-megafon.log error; location / {proxy_pass 127.0.0.1:8091 ; } location / health-check / {access_log off; return 200; }} - id_kv
  • @IlyaDyakov, I added a response to the results of your comment. By the way, it is better not to give the code in the comments, but immediately in the question by clicking edit below the text of the question. - aleksandr barakin
  • GrayHoax and where are you working? - id_kv
  • Hello, colleague) - id_kv

1 answer 1

nginx: [emerg] directive in /etc/nginx/sites-enabled/bank.megafon.ru.save:11 directive in / proc_pass

translation: incorrect number of arguments for the proxy_pass directive in the 11th line of the /etc/nginx/sites-enabled/bank.megafon.ru.save file.

this directive must have exactly one argument .


but the file suffix ( .save ) suggests that this file is just a copy of some other file that was not saved where it should be: all files in the /etc/nginx/sites-enabled/ directory are read as part of the configuration.


addition after the appearance of the file text in the question :

proxy_pass 127.0.0.1:8091;

here the protocol in url is forgotten - http://... , https://... or some other.