Skip to content

false positive errors regarding "server" directive and nginx config environment variables #45

@Thomas-1985

Description

@Thomas-1985

Describe the bug
-i have a snippet of an nginx config which gets copied to the /etc/nginx/conf.d folder. Because if this, in the main nginx.conf there is already a http directive, however, i get an error that its missing (obvious because i only have the snippet not the main nginx config). How to disable or fix the check on this file?

-i use nginx config variables (this is a docker compose setup), see here https://hub.docker.com/_/nginx#using-environment-variables-in-nginx-configuration-new-in-119

e.g.
ssl_certificate /etc/letsencrypt/live/${SERVER_NAME}/fullchain.pem;

However i get an "Unknown directive" as well as ", NginxTokenType.BINARY_OPERATOR, NginxTokenType.LBRACE or NginxTokenType.SEMICOLON expected, got '}'" error
How to disable of fix the check?

To Reproduce
Steps to reproduce the behavior:

  1. see above

Expected behavior
No errors should be displayed

Screenshots
Image

IDE (please complete the following information. See Main Menu -> Help -> About):

  • OS: Windows 11 24H2
  • Product: WebStorm Professional
  • Version 25.2.2
  • JRE Version: 21.0.8+1-b1038.71 amd64 (JCEF 122.1.9) VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

Plugin (please complete the following information. See Main Menu -> File -> Settings -> Plugins):

  • Version 2025.21

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions