Apache, Lighttpd, nginx, Cherokee
fulltilt
Posts: 366 Joined: 2006-08-27 02:06
Post
by fulltilt » 2015-08-08 14:41
wie setze ich in einer nginx conf einen cookie?
bisher habe ich im apachen folgendes verwendet:
Code: Select all
<LocationMatch /client>
Header set Set-Cookie: "xxxxxxx; path=/;"
</LocationMatch>
hier mein letzter fehlgeschlagener versuch:
Code: Select all
location /client {
proxy_set_header "xxxxxxx;"
}
wie bringe ich das nginx kompatibel hin?
L.G.
fulltilt
Posts: 366 Joined: 2006-08-27 02:06
Post
by fulltilt » 2015-08-08 14:45
sorry, hier noch die nginx details:
Code: Select all
nginx -V
nginx version: nginx/1.6.2
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' --with-ld-opt=-Wl,-z,relro --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_gzip_static_module --without-http_browser_module --without-http_geo_module --without-http_limit_req_module --without-http_limit_zone_module --without-http_memcached_module --without-http_referer_module --without-http_scgi_module --without-http_split_clients_module --without-http_ssi_module --without-http_userid_module --without-http_uwsgi_module --add-module=/tmp/buildd/nginx-1.6.2/debian/modules/nginx-echo
Joe User
Project Manager
Posts: 11185 Joined: 2003-02-27 01:00
Location: Hamburg
Post
by Joe User » 2015-08-08 14:55
Sollte analog zu Apache funktionieren:
Code: Select all
add_header Set-Cookie "blabla=foo;Domain=.example.com;Path=/;Max-Age=3600";