A few days a go i had a bizarre case with simple authentication on simple application. The application using basic HTTP Authentication that pop up for username and password to login. At first, the application work perfectly fine on development server. But after it deploy on production environment, user could not login. The application still pop up the window just like user has input wrong user and password. [caption id="" align="aligncenter" width="159" caption="Squid Proxy"][/caption] And it takes a day for me to find out the problem and know how to fix it. Apparently, on production server i had implement reverse proxy to serve HTTP request by using squid. So there's one parameter that i have to input on squid.conf, that is: login=PASS on cache peer directive:
cache_peer 192.168.0.1 parent 8080 0 no-query originserver weight=1 login=PASS
*do not forget to apply the changes by this command:
# squid -k reconfigure
And your HTTP Authentication on your application will work fine again :)
Baca konten-konten menarik Kompasiana langsung dari smartphone kamu. Follow channel WhatsApp Kompasiana sekarang di sini: https://whatsapp.com/channel/0029VaYjYaL4Spk7WflFYJ2H