RawNginxBlock: | { children: NginxBlockTypesWithContext<"main">[]; context: []; type: "main"; } | { context: ["server"]; type: "listen"; values: string[] } | { children: NginxBlockTypesWithContext<"server">[]; context: ["http"]; type: "server"; } | { context: ["http", "server", "location", "limit_except"]; type: "auth_basic"; value: string; } | { context: ["http", "server", "location", "limit_except"]; file: string; type: "auth_basic_user_file"; } | { file: string; type: "include" } | { context: ["main"]; file: string; type: "load_module" } | { context: ["http", "server"]; protocols: (
"SSLv2" | "SSLv3" | "TLSv1" | "TLSv1.1" | "TLSv1.2" | "TLSv1.3" )
[]; type: "ssl_protocols"; } | { context: ["http", "server"]; enabled: boolean; type: "ssl_prefer_server_ciphers"; } | { context: ["http", "server", "location", "location.if"]; enabled: boolean; type: "gzip"; } | { context: ["http", "server", "location", "location.if", "limit_except"]; type: "access_log"; values: string[]; } | { context: ["main", "http", "mail", "stream", "server", "location"]; file: string; level?: | "debug" | "info" | "notice" | "warn" | "error" | "crit" | "alert" | "emerg"; type: "error_log"; } | { context: ["http", "server"]; time: string; type: "ssl_session_timeout"; } | { context: ["http", "server"]; type: "ssl_session_cache"; values: string[]; } | { context: ["http", "server"]; enabled: boolean; type: "ssl_session_tickets"; } | { context: ["http", "server"]; enabled: boolean; type: "ssl_stapling" } | { context: ["http", "server"]; enabled: boolean; type: "ssl_stapling_verify"; } | { ciphers: string[]; context: ["http", "server"]; type: "ssl_ciphers" } | { context: ["http", "server"]; curves: string[]; type: "ssl_ecdh_curve" } | { context: ["http", "server"]; file: string; type: "ssl_dhparam" } | { always?: boolean; context: ["http", "server", "location", "location.if"]; name: string; type: "add_header"; value: string; } | { children: NginxBlockTypesWithContext<"http">[]; context: ["main"]; type: "http"; } | { context: ["http", "server", "location", "location.if"]; enabled: boolean; type: "sendfile"; } | { context: ["http", "server", "location"]; enabled: boolean; type: "tcp_nopush"; } | { context: ["http", "server", "location"]; mimeType: string; type: "default_type"; } | { context: ["http", "server", "location"]; size: number; type: "types_hash_max_size"; } | { context: ["main"]; count: number | "auto"; type: "worker_processes" } | { context: ["main"]; group?: string; type: "user"; user: string } | { context: ["main"]; file: string; type: "pid" } | { context: ["events"]; count: number; type: "worker_connections" } | { children: NginxBlockTypesWithContext<"events">[]; context: ["main"]; type: "events"; } | { code?: HttpStatus; context: ["server", "location", "if"]; type: "return"; url: string; } | { code: HttpStatus; context: ["server", "location", "if"]; text: string; type: "return"; } | { children: NginxBlockTypesWithContext<"location">[]; context: ["server", "location"]; matcher?: "=" | "~" | "~*" | "^~"; type: "location"; uri: string; } | { context: ["http", "server"]; file: string; type: "ssl_certificate" } | { context: ["http", "server"]; file: string; type: "ssl_certificate_key"; } | { context: ["http", "server", "location"]; name: string; type: "proxy_set_header"; value: string; } | { context: ["location", "location.if", "limit_except"]; type: "proxy_pass"; url: string; } Type declaration
- { children: NginxBlockTypesWithContext<"main">[]; context: []; type: "main" }
- { context: ["server"]; type: "listen"; values: string[] }
context: ["server"]
type: "listen"
values: string[]
- {
children: NginxBlockTypesWithContext<"server">[];
context: ["http"];
type: "server";
}context: ["http"]
type: "server"
- {
context: ["http", "server", "location", "limit_except"];
type: "auth_basic";
value: string;
}context: ["http", "server", "location", "limit_except"]
type: "auth_basic"
value: string
- {
context: ["http", "server", "location", "limit_except"];
file: string;
type: "auth_basic_user_file";
}context: ["http", "server", "location", "limit_except"]
file: string
type: "auth_basic_user_file"
- { file: string; type: "include" }
file: string
type: "include"
- { context: ["main"]; file: string; type: "load_module" }
context: ["main"]
file: string
type: "load_module"
- {
context: ["http", "server"];
protocols: (
"SSLv2"
| "SSLv3"
| "TLSv1"
| "TLSv1.1"
| "TLSv1.2"
| "TLSv1.3"
)[];
type: "ssl_protocols";
}context: ["http", "server"]
protocols: ("SSLv2" | "SSLv3" | "TLSv1" | "TLSv1.1" | "TLSv1.2" | "TLSv1.3")[]
type: "ssl_protocols"
- {
context: ["http", "server"];
enabled: boolean;
type: "ssl_prefer_server_ciphers";
}context: ["http", "server"]
enabled: boolean
type: "ssl_prefer_server_ciphers"
- {
context: ["http", "server", "location", "location.if"];
enabled: boolean;
type: "gzip";
}context: ["http", "server", "location", "location.if"]
enabled: boolean
type: "gzip"
- {
context: ["http", "server", "location", "location.if", "limit_except"];
type: "access_log";
values: string[];
}context: ["http", "server", "location", "location.if", "limit_except"]
type: "access_log"
values: string[]
- {
context: ["main", "http", "mail", "stream", "server", "location"];
file: string;
level?:
| "debug"
| "info"
| "notice"
| "warn"
| "error"
| "crit"
| "alert"
| "emerg";
type: "error_log";
}context: ["main", "http", "mail", "stream", "server", "location"]
file: string
Optional
level?: "debug" | "info" | "notice" | "warn" | "error" | "crit" | "alert" | "emerg"
type: "error_log"
- { context: ["http", "server"]; time: string; type: "ssl_session_timeout" }
context: ["http", "server"]
time: string
type: "ssl_session_timeout"
- { context: ["http", "server"]; type: "ssl_session_cache"; values: string[] }
context: ["http", "server"]
type: "ssl_session_cache"
values: string[]
- { context: ["http", "server"]; enabled: boolean; type: "ssl_session_tickets" }
context: ["http", "server"]
enabled: boolean
type: "ssl_session_tickets"
- { context: ["http", "server"]; enabled: boolean; type: "ssl_stapling" }
context: ["http", "server"]
enabled: boolean
type: "ssl_stapling"
- { context: ["http", "server"]; enabled: boolean; type: "ssl_stapling_verify" }
context: ["http", "server"]
enabled: boolean
type: "ssl_stapling_verify"
- { ciphers: string[]; context: ["http", "server"]; type: "ssl_ciphers" }
ciphers: string[]
context: ["http", "server"]
type: "ssl_ciphers"
- { context: ["http", "server"]; curves: string[]; type: "ssl_ecdh_curve" }
- { context: ["http", "server"]; file: string; type: "ssl_dhparam" }
context: ["http", "server"]
file: string
type: "ssl_dhparam"
- {
always?: boolean;
context: ["http", "server", "location", "location.if"];
name: string;
type: "add_header";
value: string;
}Optional
always?: boolean
context: ["http", "server", "location", "location.if"]
name: string
type: "add_header"
value: string
- {
children: NginxBlockTypesWithContext<"http">[];
context: ["main"];
type: "http";
}context: ["main"]
type: "http"
- {
context: ["http", "server", "location", "location.if"];
enabled: boolean;
type: "sendfile";
}context: ["http", "server", "location", "location.if"]
enabled: boolean
type: "sendfile"
- {
context: ["http", "server", "location"];
enabled: boolean;
type: "tcp_nopush";
}context: ["http", "server", "location"]
enabled: boolean
type: "tcp_nopush"
- {
context: ["http", "server", "location"];
mimeType: string;
type: "default_type";
}context: ["http", "server", "location"]
mimeType: string
type: "default_type"
- {
context: ["http", "server", "location"];
size: number;
type: "types_hash_max_size";
}context: ["http", "server", "location"]
size: number
type: "types_hash_max_size"
- { context: ["main"]; count: number | "auto"; type: "worker_processes" }
context: ["main"]
count: number | "auto"
type: "worker_processes"
- { context: ["main"]; group?: string; type: "user"; user: string }
context: ["main"]
Optional
group?: string
type: "user"
user: string
- { context: ["main"]; file: string; type: "pid" }
context: ["main"]
file: string
type: "pid"
- { context: ["events"]; count: number; type: "worker_connections" }
context: ["events"]
count: number
type: "worker_connections"
- {
children: NginxBlockTypesWithContext<"events">[];
context: ["main"];
type: "events";
}context: ["main"]
type: "events"
- {
code?: HttpStatus;
context: ["server", "location", "if"];
type: "return";
url: string;
}Optional
code?: HttpStatus
context: ["server", "location", "if"]
type: "return"
url: string
- {
code: HttpStatus;
context: ["server", "location", "if"];
text: string;
type: "return";
}code: HttpStatus
context: ["server", "location", "if"]
text: string
type: "return"
- {
children: NginxBlockTypesWithContext<"location">[];
context: ["server", "location"];
matcher?: "=" | "~" | "~*" | "^~";
type: "location";
uri: string;
}context: ["server", "location"]
Optional
matcher?: "=" | "~" | "~*" | "^~"
type: "location"
uri: string
- { context: ["http", "server"]; file: string; type: "ssl_certificate" }
context: ["http", "server"]
file: string
type: "ssl_certificate"
- { context: ["http", "server"]; file: string; type: "ssl_certificate_key" }
context: ["http", "server"]
file: string
type: "ssl_certificate_key"
- {
context: ["http", "server", "location"];
name: string;
type: "proxy_set_header";
value: string;
}context: ["http", "server", "location"]
name: string
type: "proxy_set_header"
value: string
- {
context: ["location", "location.if", "limit_except"];
type: "proxy_pass";
url: string;
}context: ["location", "location.if", "limit_except"]
type: "proxy_pass"
url: string
All raw Nginx block types. This includes a
context
property, which isn't used in block definitions but is used in types here to determine which children each block can have.