set-Cookie with ProxyPassReverseCookieDomain feature

dt dt20xx at
Tue Dec 15 04:10:40 MSK 2009


I'm thinking of using nginx as reverse proxy server to an original
server which use cookie for user-authentication.

Since the original server provide set-cookie header with specific
domain,  domain-setting parameter in set-cookie header has to be

Would you please teach me how to configure this feature?
I think Apahe mod-proxy's  "ProxyPassReverseCookieDomain" feature is
similar , But I coudn't find those kind of module or property for

== nginx.conf ==

upstream xxx {
  server weight=3;
server {
 listen 80;
 server_name yyy;
 proxy_set_header X-Real-Ip $remote_addr;
 proxy_set_header X-Forwardded-For $proxy_add_x_forwarded_for;
$proxy_set_header Host $http_host;

 location / {
   proxy_pass_header Set-Cookie;
   proxy_pass http://xxx;
   sub_filter_once off;
   sub_filter '' 'yyy';


Daisuke Takano dt20xx at

More information about the nginx mailing list