Hi,
is it possible to use
proxy_set_header
for a special subdomain within a normal "match-all" server-directive?
I want to set special informations in the Request header to say my server please serve in english (in this example)
and i want to set any language for any subdomain as i want so it would be cool to to this in the ngix-configuration.
but nginx says ""proxy_set_header" directive is not allowed here"
Example:
server {
listen 80;
#ADD LANGUAGE FLAGS TO SUBDOMAINS
if ($http_host ~* "it.mydomain.de") {
proxy_set_header vd-transl-lang en;
}
#many location..and so on rules
# RULESRULES
}
OR
is it possible to extract #RULESRULES to an seperate "i dont know.. class?" and do something like this:
#special
server {
listen 80;
server_name it.domain.de;
proxy_set_header vd-transl-lang en;
INCLUDE rules;
}
#all other
server {
listen 80;
server_name domain.de;
INCLUDE rules;
}
rules {
#many location..and so on rules
# RULESRULES
}
Edited 1 time(s). Last edit at 03/12/2010 04:28AM by teena.