Apache 2.4 basic auth

Fórumok

Valakinek sikerült már belőni sima htpasswd-s, vagy bármilyen alap egyszerű authentikációt 2.4-es apache alatt? Sehogy sem működik. Vagy 404, vagy jelszó nélkül kiadja a fájllistát...

Hozzászólások

El valami trükkös kérdés?

http://104.167.101.112/

hup/dejo


root@debian:/var/www/html# cat /var/www/html/.htaccess
AuthType Basic
AuthName "Password Required"
AuthUserFile "/tmp/dejo"
Require valid-user
root@debian:/var/www/html# cat /tmp/dejo
hup:$apr1$DrQ3yygi$I1RSBLLCZHb9M8TpxMptJ0

Ja és persze:
AllowOverride AuthConfig

a /var/www-re

Nem trükkös kérdés... Nem megy sehogy.
100 ilyet próbáltam már, hidd el. Betettem a tiedet is, ahogy mondtad. Így azt mondja, hogy
[Fri May 08 08:15:56.518267 2015] [core:alert] [pid 20001] [client xxxxxxxxxxxx:33301] /var/www/xxxxxxxxxxxxxxxxx/web/letoltes/cs/.htaccess: AuthType not allowed here
Átraktam AllowOverride All-ra, így meg simán kiadja jelszó nélkül.
--
The Community ENTerprise Operating System


# grep auth *
00-base.conf:LoadModule auth_basic_module modules/mod_auth_basic.so
00-base.conf:LoadModule auth_digest_module modules/mod_auth_digest.so
00-base.conf:LoadModule authn_anon_module modules/mod_authn_anon.so
00-base.conf:LoadModule authn_core_module modules/mod_authn_core.so
00-base.conf:LoadModule authn_dbd_module modules/mod_authn_dbd.so
00-base.conf:LoadModule authn_dbm_module modules/mod_authn_dbm.so
00-base.conf:LoadModule authn_file_module modules/mod_authn_file.so
00-base.conf:LoadModule authn_socache_module modules/mod_authn_socache.so
00-base.conf:LoadModule authz_core_module modules/mod_authz_core.so
00-base.conf:LoadModule authz_dbd_module modules/mod_authz_dbd.so
00-base.conf:LoadModule authz_dbm_module modules/mod_authz_dbm.so
00-base.conf:LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
00-base.conf:LoadModule authz_host_module modules/mod_authz_host.so
00-base.conf:LoadModule authz_owner_module modules/mod_authz_owner.so
00-base.conf:LoadModule authz_user_module modules/mod_authz_user.so

--
The Community ENTerprise Operating System

Hmm az apache2ctl -M is kihozza?


root@debian:~# apache2ctl -v
Server version: Apache/2.4.10 (Debian)
Server built:   Mar 15 2015 09:51:43

root@debian:~# apache2ctl -M | grep "auth"
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
 auth_basic_module (shared)
 authn_core_module (shared)
 authn_file_module (shared)
 authz_core_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)

Egy apache konfigot mutass már :)

---------------------------------------------------
Hell is empty and all the devils are here.
-- Wm. Shakespeare, "The Tempest"

Igen, mert 24 órát élt a feltöltés...
Közben kísérleteztem párat, és annyira sikerült rájönni, hogy a főoldalon (webrootban) lévő htaccess rewrite-ja kavar be. Ha azt kiveszem, minden tökéletes... Kivéve persze a főoldal. Az a htaccess egyébként a wordpress defaultja... Szóval nem értem. Eddig is ez volt.
--
The Community ENTerprise Operating System

Hu, van compat modul? Ezt eddig miert nem mondta nekem senki? Volt par projektem, aminel pont a megvaltozott szintaxis miatt szopattuk egymast a fejlesztovel, mire kiizzadtuk a jo htaccess-t. Azota a sajat hostingon nem merek frissiteni 2.4-re, mert a webappok tobbsege egyszeruen meg nem allt at.
--
Blog | @hron84
Üzemeltető macik

A kérdéses oldal, illetve az az alatti jelszóvédett könyvtárak még mindig nem mennek. Teljesen biztos, hogy a rewrite-tal van valami, mert ha ezt kiveszem, akkor azok rögtön jók lesznek.
A felső részt adtam hozzá én, alatta ami van, az a wordpress default-ja.


<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R,L]
</IfModule>

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

--
The Community ENTerprise Operating System