Skip to content

Support fragmented Nginx configuration #11

@harry-xm

Description

@harry-xm

Common practice, as seen in default configuration on Ubuntu, is to split server{} blocks into separate files in the sites-enabled directory.

When I try to use nginx-language-server on these partial configuration files, crossplane could not correctly parse them because of errors like "server" directive is not allowed here.

Is it possible to detect such configuration and automatically add a surrounding block to fix crossplane parsing?

# /etc/nginx/sites-enabled/default
server {
	listen 80 default_server;
	listen [::]:80 default_server;
...
}

# nginx.conf
http {
...
	include /etc/nginx/conf.d/*.conf;
	include /etc/nginx/sites-enabled/*;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions