# Authentication layer, help needed

**URL:** <https://www.ruby-forum.com/t/authentication-layer-help-needed/191417>\
**Category:** NGINX\
**Created:** [July 12, 2010, 1:20pm UTC](https://www.ruby-forum.com/t/authentication-layer-help-needed/191417 "2010-07-12T13:20:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AKasper](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a698b9/32.png) [@AKasper](https://www.ruby-forum.com/u/AKasper)\
**Post date:** [July 12, 2010, 1:20pm UTC](https://www.ruby-forum.com/t/authentication-layer-help-needed/191417/1 "2010-07-12T13:20:18Z")

</div>

i am migrating from SQUID to NGINX.

While using SQUID, we had a IP based authentication layer:

if request to [http://siteurl/servicename/service.php](http://siteurl/servicename/service.php) → check list (data  
is saved in a file as tupel of ip:username:password)  
if requesting client ip eq list ip → rewrite url to backend as  
[http://siteurl/servicename/service.php&username=username&password=password](http://siteurl/servicename/service.php&username=username&password=password).

What is the best method to implement this on NGINX? I am pretty new to  
nginx, proxy function and ssl is working like a charm, but i dont know  
what method i should use.  
At the moment i am experimenting to use the SimplePerl Module to handle  
my needs (i am also new to perl, but day to day there is a effort in  
handliung it). Is this the right way? Anyone there with a better idea?

Thanks in advance for your help - and thanks to Igor for this great  
piece of software!

Posted at Nginx Forum:

> **[Authentication layer, help needed](https://forum.nginx.org/read.php?2,107852,107852#msg-107852)**
>
> i am migrating from SQUID to NGINX. While using SQUID, we had a IP based authentication layer: if request to http://siteurl/servicename/service.php -\> check list (data is saved in a file as tupel of ip:username:password) if requesting client ip eq...
