
memcached
たとえば、キー「match_1」から直接読み取るように nginx を設定したいと思います。
server
これが私の設定です
server {
listen 8080;
server_name localhost;
location /get_match {
set $memcached_key "match_$arg_match";
memcached_pass 192.168.3.54:11211;
}
}
しかし、アクセスしようとするとhttp://example.com:8080/get_match?match=1私は を取得します404 Not Found
。
何が足りないのでしょうか?
編集:
location /get_match
に変更したらlocation @get_match
、404 が表示されなくなり、空白ページが表示されるようになりました。
修理済み:
に変更しましたlocation = /get_match
。うまくいきました。
答え1
location /get_match
に変更しただけですlocation = /get_match
。うまくいきました。
しかし、その理由はわかりません。=
正確な場所のみを表示し、パーサーが指定された場所の他の可能性のある一致を検索するのを停止するだけだと考えていました。コメントをいただければ幸いです。