サイトをCakePHP3で構築しています。
このサイトにBasic認証をかけたいのですが、全体にはBasic認証をかけた上で、特定のURL(別システムとの連携API)については、Basic認証不要でアクセスできるようにしたいと思っています。
以下のようなサイトを参考にしました。
https://www.sssg.org/blogs/naoya/archives/1745
http://d.hatena.ne.jp/hirose31/20100329/1269847895
https://blog.s-giken.net/142.html
http://fdays.blogspot.jp/2008/07/apache-url.html
https://thesaibase.com/server/htaccess-basic-auth
そして、
<Location /> Allow from all </Location> <Location /hoge/> AuthUserfile /dir/to/.htpasswd AuthGroupfile /dev/null AuthName "Please enter your ID and password" AuthType Basic require valid-user </Location> <Location /hoge/bar/product_api> Satisfy Any Order allow,deny Allow from all </Location>
のように書いたのですが、
/hobe/bar/product_api
も、Basic認証を求められてしまいます。
OSは、
CentOS Linux release 7.4.1708 (Core)
Apacheは、
Server version: Apache/2.4.6 (CentOS)
です。
よろしくお願いします。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。