Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

errounous semicolon after single-line location block #16

Closed
Mic92 opened this issue Apr 8, 2019 · 3 comments
Closed

errounous semicolon after single-line location block #16

Mic92 opened this issue Apr 8, 2019 · 3 comments
Labels

Comments

@Mic92
Copy link

Mic92 commented Apr 8, 2019

Reported in NixOS/nixpkgs#57979 (comment):

The following configuration:

location /example { allow 192.168.0.0/16; deny all; }

results in

  location /example {
    allow 192.168.0.0/16;
    deny all;
  }
  ;

the trailing ; will produce an error message in nginx like this:

апр 08 14:55:45 web.elven.pw systemd[1]: Starting Nginx Web Server...
апр 08 14:55:45 web.elven.pw pnzhwc1q1is8vbdkg34ksicqq9jh5chc-unit-script-nginx-pre-start[2430]: nginx: [emerg] unexpected ";" in /nix/store/glvppaxv9gqg9vj179ph9rmj8yg41d72-nginx.conf:151

The nginx version is 1.14.2.

@Mic92 Mic92 changed the title errounous semicolon after location block errounous semicolon after single-line location block Apr 8, 2019
@Mic92
Copy link
Author

Mic92 commented Apr 8, 2019

Here is a workaround NixOS/nixpkgs#59181
However I would very much prefer a fix in nginx-config-formatter instead.

@Mic92
Copy link
Author

Mic92 commented Apr 8, 2019

cc @4z3

@slomkowski slomkowski added the bug label Apr 19, 2021
slomkowski added a commit that referenced this issue Apr 20, 2021
@slomkowski
Copy link
Owner

Fixed, will be published in next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants