Re: How to config Authz form ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Eric,

what you think?
The directive is wrong?

Seems to be work, now,
But the form "action" /login.php  where redirect, now.

I can use "session" variables form php, but what I think is missing,
what directive give/the information tp apache2.4 , that the
This is what I have done:

    <Location "${APACHE_WEB}/443/index.php">
        AllowMethods GET POST HEAD OPTIONS
        Options +Indexes +FollowSymLinks
        AllowOverride AuthConfig Indexes
       
        SetHandler form-login-handler
       
        AuthType form
        AuthName "Restricted Resource"
       
        AuthFormUsername bw_username
        AuthFormPassword bw_password
       
        AuthBasicProvider file
        AuthUserFile  "${APACHE_SRC}/pass/ApacheAuthUser.passwd"
        AuthGroupFile "${APACHE_SRC}/pass/ApacheAuthUser.groups"
       
        AuthFormLoginRequiredLocation "/index.php"
        AuthFormLoginSuccessLocation  "/index/index.php"
       
        Session On
        SessionCryptoPassphrase gUxw1NQnqCbkj01Ubv2E
        SessionCookieName session path=/
        SessionMaxAge 0
       
        Require valid-user
    </Location>
    <Location "/index">
        AllowMethods GET POST HEAD OPTIONS
        Require valid-user
    </Location>
    <Location "/index/.">
        AllowMethods GET POST HEAD OPTIONS
        Require valid-user
    </Location>

    <Location "/logout">
        SetHandler form-logout-handler
        AuthFormLogoutLocation "/"
       
        Session on
        SessionCryptoPassphrase gUxw1NQnqCbkj01Ubv2E
        SessionCookieName session path=/
        SessionMaxAge 1
    </Location>


<body>
    <h1>Authentication required to access <span class="bw_domain">the requested website</span></h1>
    <form method="post" action="">
        <div id="bw_error">
            <p>Login failed!<br/>Please check the provided username and password and try again.</p>
        </div>
        <fieldset>
            <label>Username</label>
            <input type="text" name="bw_username" value="" id="bw_username" />
            <label>Password</label>
            <input type="password" name="bw_password" value="" id="bw_password" />
            <input type="submit" value="Login" name="bw_login" />
        </fieldset>
    </form>
</body>


i will be redirect /login.php, ok.

But, when I type in browser address bar:
https://domain/
all ok,
But when https://domain/index/

I get "internal server error" instead unauthz message.

Jens

Am 02.01.2021 um 17:00 schrieb Eric Covener:
Could it be related to no AuthFormLoginRequiredLocation?

On Sat, Jan 2, 2021 at 10:12 AM Jens Kallup <kallup.jens@xxxxxx> wrote:
Hello,

I added a picture link, which shows the error message,
that comes, when i click "Login".

in the decent yellow box: translated:
"unknow protocol"

https://imgur.com/FYER4Y7

Jens

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux