Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [http-basic-authentication]

Filter by
Sorted by
Tagged with
0 votes
2 answers
33 views

Basic auth and data from curl to HAProxy backend not working on TLS Termination - but works on TLS passthrough

listen pki bind *:8884 ssl no-sslv3 crt /HAPROXY.pem.ecdsa verify required ca-file /CA_CHAIN.pem mode http http-request add-header Content-Type "application/pkcs10" http-...
user avatar
0 votes
0 answers
11 views

Protect many subdirectories with basic auth in apache2

I have dozens of subdirectories I want users to authenticate But the homepage and one or two subdirectories should be public Is there a nice way to accomplish this without having to write dozens of ...
user avatar
0 votes
0 answers
75 views

Nginx Reverse proxy with basic auth and ssl, to many request errr

I have a config with a reverse proxy, basic authentication and SSL certificate from Certbot. When I try to connect to the domain, I get the error to many requests and see in the network tab that the ...
user avatar
  • 1
0 votes
1 answer
172 views

Nginx Disable Basic Auth - Laravel Forge

On a Laravel Forge Nginx Server I've enabled basic auth security at a root level for my site, this is working fine. However I'm now trying to exclude a webhooks path from basic auth to allow the site ...
user avatar
1 vote
2 answers
42 views

HTTPD server does LDAP authentication. How does the mechanism work?

I have a HTTPD apache server which does LDAP authentication. When the user hits the URL http://localhost/, a browser prompt pops up asking for username and password. How are the username and password ...
user avatar
  • 73
3 votes
2 answers
1k views

.htaccess - Exclude folder from basic auth protection

I have a website where no one is allowed to enter without entering the basic auth credentials. However, I need the media folder to be accessible by everyone, because we are using a third party ...
user avatar
  • 391
1 vote
1 answer
386 views

Varnish with Basic auth returns 401

I've tried to configure Varnish on server which has Basic Auth authentication by using these solutions: https://stackoverflow.com/a/40424168/7202171 https://blog.tenya.me/blog/2011/12/14/varnish-http-...
user avatar
2 votes
1 answer
70 views

I'm not sure if basic auth on my server is being secured

This may be a really dumb question but I had to make sure that i'm fine with this. I setup an HTTPS server with basic auth, but the browser informs me that the connection is not secured when i connect ...
user avatar
  • 23
1 vote
1 answer
376 views

Nginx Http Basic Auth Security

So lets say I host something like netdata dash board on port 6000. Then I nginx reverse proxy it to the subdomain netdata.domain.com While basic auth is applied at the nginx.conf to allow site wide ...
user avatar
0 votes
1 answer
372 views

How to Exclude Basic Auth from Nginx Subdomain

I have the two lines of basic auth added in the nginx.conf. So that all subdomain blocks under reverse proxy are password protected. But I do have a few in which I don't want it to have that. What do ...
user avatar
2 votes
1 answer
122 views

Are there common situations that cause a "401 Error" being displayed without a login dialog being displayed first?

Perhaps this is a somewhat broad question, but I am currently relying on shots in the dark ... We sometimes provide access to some web URLs (running Apache 2.4) protected by basic password protection. ...
user avatar
0 votes
1 answer
339 views

nginx: autoindex with basic auth

I have a running website where I have a specific directory where I store random stuff (it sounds very informal and it indeed is). So, I wanted to have some sort of index there that lists the contents ...
user avatar
0 votes
0 answers
241 views

Password protecting an upstream server using Nginx

I've been searching for ages and whilst I can find lots of questions about proxying to a password-protected server using Nginx, I can't find any references to how to go about adding basic ...
user avatar
  • 143
1 vote
1 answer
279 views

nginx basic_auth fails when moving outside location, to "root"

This works: location /someplace/ { auth_basic "Restricted Access"; auth_basic_user_file /etc/nginx/.htpasswd; } I go to /someplace/ and I get prompted for the user and password and can ...
user avatar
  • 3,172
1 vote
1 answer
211 views

Is it possible to use a auth_basic password protection using linux users and passwords?

I'd like to password protect a website allowing only Linux users and their passwords stored in /etc/passwd and /etc/shaddow to login. Apache and nginx allow to restrict accessung by using a HTTP ...
user avatar
  • 234
3 votes
1 answer
560 views

Can I use rate-limiting with HTTP basic authentication in Apache?

So I'm running a few popular web applications on my server. I want these to be reachable from any computer without creating too many vulnerabilities. I am using Apache 2.4.29 as my HTTP server. My ...
user avatar
  • 33
0 votes
1 answer
369 views

Redirect incoming URL request between basic authentication and openidc in apache

Redirect incoming URL request between basic authentication and openidc. I want to categorize if the request for URL is coming from "wget/curl" then i need it to get authenticated with Basic ...
user avatar
  • 1
1 vote
0 answers
1k views

curl not sending credentials during negotiation

We have a Jenkins server that uses Kerberos-SSO, with a fallback to Basic if SSO is not configured on the browser or using curl. When I use curl with the --negotiate argument, however, it doesn't send ...
user avatar
  • 514
0 votes
0 answers
462 views

SSL Connection to MySQL database

I have read some answers here on serverfault that suggests it is not a good idea to open a MySQL port to the firewall, so I am trying to setup accordingly. Two options remain to connect to MySQL: SSH ...
user avatar
1 vote
0 answers
81 views

Apache2 Location directive and mod_rewrite

I have a website that is protected with basic authentication, except for one file, one folder, and one rewritten URL location. It looks like this: <Directory /var/www/mydomain.com> AuthType ...
user avatar
0 votes
0 answers
39 views

Require IP still asking for login

I set following vhost which I want to be accessible without login when called from within the network, but with login when called from outside. However, no matter how I change the Require IP, ...
user avatar
  • 1
0 votes
0 answers
733 views

Basic Authentication not working on Apache 2.4.6 <Location ...>

Just moved a site to new server, replaced the Allow.... directives with Require... Centos7, Apache 2.4.6 I have one location that I was using basic authentication and working fine, here is the ...
user avatar
  • 21
1 vote
1 answer
913 views

How to disable basic authentication when using kerberos on nginx?

My task is to configure Kerberos authentication on nginx. The backend is django. The idea is that when a request is made to api, nginx should perform kerberos authentication. But in case the user is ...
user avatar
1 vote
0 answers
49 views

Apache individual DocumentRoot per REMOTE_USER

How can I give authenticated users an individual view of the DocumentRoot? I would like to lock users in their own directory. When alice visits http://example.net/ she only sees /srv/www/alice/ and ...
user avatar
  • 111
1 vote
0 answers
186 views

gitweb: Use Apache HTTP basic authentication for repository authentication

I use gitweb to serve remote Git repositories on a server running Apache2. Everything is setup with automatic redirection from HTTP to HTTPS and Basic password authentication (though this might change ...
user avatar
1 vote
0 answers
133 views

basic auth for all pages except one

I have a wordpress page and want to add basic auth to the page, except for the wordpress rest api (url: localhost/wp-json/xyz)! The main problem seems to be the redirect that happens in the standard ....
user avatar
0 votes
1 answer
220 views

mod security blocking basic authentication

I have a vps with centos 7, apache with mod_security and mod_evasive. I have a form in php with basic authentication. When I try to authenticate through the application (before activating mod security ...
user avatar
  • 1
2 votes
1 answer
3k views

Disabling (Apache) Basic Authentication for OPTIONS requests

I have Apache basic authentication enabled on a test server and it works great: AuthType Basic AuthName "testing" AuthUserFile /home/www/.htpasswd Require user MyUser deny from all But it is also ...
user avatar
2 votes
1 answer
640 views

How do I get Nginx to work with subdirectories? [Nginx, Let's Encrypt, basic auth]

What I want: I want to install Mautic in a subfolder of my web root. I have a domain https://example.com and I want Mautic to be accessible from https://example.com/mautic. What I have: I have a ...
user avatar
0 votes
1 answer
1k views

Require basic auth for specific IPs in nginx

I have a whitelist of IPs for nginx, but in addition to this I want to require basic authentication for specific IP. For example, allow access for these IPs: 198.51.100.1 198.51.100.2 require basic ...
user avatar
  • 266
1 vote
1 answer
437 views

Basic Auth in htaccess... only if in a specific subpath

We deploy the same code with the same .htaccess to Integration, Stage and Production. I want to require a basic auth on all but the Production server. They differ in the path, e.g. /data/stage/www/...
user avatar
1 vote
1 answer
464 views

Adding Basic Authentication to Nginx that contains existing Rewrite rules

I have images successfully served through a Nginx rewrite rule: # Rewrite part ============== location ~* "^/([a-z]{5})/([0-9]{5}).png$" { rewrite .* "/$1/image_handler.php?x=$2" last; } Now I ...
user avatar
  • 121
1 vote
0 answers
1k views

nginx Basic Authentication configuration on windows can't find user in auth_basic_user_file

I'm trying to set up basic authentication on an nginx 1.14.2 server on a Windows 7 machine. Here's my test configuration: worker_processes 1; events { worker_connections 1024; } http { ...
user avatar
  • 111
1 vote
1 answer
261 views

Nginx. White-list top filter and no auth white-list and basic auth simultaneously

Can't find a way to build the next scheme. A whitelist of IPs ever allowed. Ban for most of the net. A sublist of whitelisted IPs allowed to bypass auth. A part of a local net, for example. Basic ...
user avatar
  • 13
1 vote
1 answer
5k views

How can I access an environment variable set by a rewrite rule in an expression?

I am working on a Symfony 3.4 application which has public and private parts. However, I am currently setting up a staging system for this application which should only be accessed by authorized users,...
user avatar
  • 181
0 votes
2 answers
660 views

restrict access to subdirectory in apahe, leaving parent open

I am setting a webdav on apache2.4 and I need for my top directory /webdav to be freely open and for a sub directory like /webdav/projects/secretproject to be protected with a password. My curremt ...
user avatar
0 votes
0 answers
225 views

How to secure an insecure device on an untrusted network, via a web proxy?

Here's my situation: I've got a network-based device with a web-page interface, and the developers of this device, in their wisdom, did not include any kind of access-control or encryption for the ...
user avatar
0 votes
1 answer
96 views

Apache queries mariadb database -> how to log queries?

I got a apache2 vhost-configuration with BasicAuth. With the AuthDBDUserPWQery directive I'm checking a mariadb in the background, if the user-pw-combination exists. For troubleshooting I want to see ...
user avatar
  • 1
-1 votes
3 answers
2k views

Why apache need authorization for url with username and password?

I build basic authorization in apache.Only one line in /var/www/html/remote.html. <p>it is a test </p> Now to verify the username and password with curl. curl -u xxxx:xxxx -v http://...
user avatar
  • 85
0 votes
1 answer
648 views

htaccess + htpasswd: how to prevent executing php scripts without specifying a password

My site is managed by Apache on Linux. In the base directory, there is the sub folder fill. In this subfolder, there is a php script: do.php Here is my .htaccess: AuthType Basic AuthName 'Welcome ...
user avatar
  • 359
0 votes
0 answers
27 views

Authenticate app on server

I did a website that is only allowed to people whose IP are whitelisted. Unfortunately for me, my client wants me to create an app. What I did, and it works since I've implemented a Basic Auth to ...
user avatar
  • 3
15 votes
1 answer
47k views

"server certificate verification OK" but "ALPN, server did not agree to a protocol"

I am making a curl call curl -v ... https://... and the verbose output contains .... * ALPN, offering http/1.1 * SSL connection using TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256 * server certificate ...
user avatar
1 vote
2 answers
2k views

Nginx: Basic_auth is set up and working, but all protected pages return 404

I've set up basic auth on some pages on my site. Server logs are showing that the authentication is working, however, once I'm logged in all the protected pages return 404 errors - and not my actual ...
user avatar
0 votes
3 answers
2k views

How to grant access to sublocations when root location is protected by htauth in Apache 2.4

I have the following site configuration <Location /> AuthUserFile /path/.htpasswd AuthName "Restricted Area" AuthType Basic require valid-user </Location> which restricts ...
user avatar
  • 199
0 votes
1 answer
223 views

Multi-User Server ; Basic Authentication ; User 1 Can Access User 2s Folder After Logging In To His Own and Backtracking

I have an Apache 2.4 server running with PHP and MySQL included. I have pages that are restricted (or are supposed to be) to certain users only. Each user has their own restricted page and must supply ...
user avatar
7 votes
3 answers
10k views

Configure Basic Authentication on Azure's App Service

For different reasons I'm using Azure's App Service to serve static files. I would like to secure this access by Http Basic Authentication which is enough for my purposes. How can I do that? I tried ...
user avatar
0 votes
1 answer
2k views

Apache 2.4: Set user dependent environment variable

I just wondered if it's possible to set an environment variable depending on the basic authentication user. I tried the following versions, but none of them work (obviously none of them is documented ...
user avatar
0 votes
0 answers
269 views

Apache Basic authentication using .htaccess file doesnt work on files in directory

I need to protect files within a directory, I used .htaccess file as below and put it in the directory : AuthType Basic AuthName "Authentication Required" AuthUserFile "c:\passwords\.htpasswd" ...
user avatar
1 vote
0 answers
498 views

Adding exception to nginx HTTP basic authentication based on being on the local network

I'm running an installation of a webapp running on a self-hosted server which is on my main network along with all our company PCs and a couple of other servers. We've decided we want to add HTTP ...
user avatar
  • 384
0 votes
1 answer
5k views

Apache basic auth with LDAP and reverse proxy

So im using Apache 2.4, I want to set up a basic auth connected with LDAP and then, reverse proxy. The idea is to secure a webpage with this authorization. So here is my config: Order deny,allow ...
user avatar

1
2 3 4 5