# Are there any good Nginx configuration with Basic Authentication

**URL:** <https://forum.gitea.com/t/are-there-any-good-nginx-configuration-with-basic-authentication/826>\
**Category:** General\
**Created:** [January 6, 2019, 3:48am UTC](https://forum.gitea.com/t/are-there-any-good-nginx-configuration-with-basic-authentication/826 "2019-01-06T03:48:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gitea2019](https://avatars.discourse-cdn.com/v4/letter/g/6a8cbe/32.png) [@gitea2019](https://forum.gitea.com/u/gitea2019)\
**Post date:** [January 6, 2019, 3:48am UTC](https://forum.gitea.com/t/are-there-any-good-nginx-configuration-with-basic-authentication/826/1 "2019-01-06T03:48:38Z")

</div>

Hi,  
As the title mention, are there any good configuration for reference?

Or, if you have configured Nginx with Bacis Authentication, however, you don’t make it work.

I want to know something about this topic.

Without Bacis Authentication, it is ok to work. But, I add Basic Authentication feature to Nginx configuration. I can’t use git clone and I guess git push failure to do either.

The wrong is 401.

> \< HTTP/1.1 401 Unauthorized
> 
> \< Server: nginx/1.14.2
> 
> \< Date: Sun, 06 Jan 2019 10:44:10 GMT
> 
> \< Content-Type: text/html
> 
> \< Content-Length: 195
> 
> \< Connection: keep-alive
> 
> - Authentication problem. Ignoring this.
> 
> \< WWW-Authenticate: Basic realm=“Restricted Content”
