You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by MOKRANI Rachid <ra...@ifpen.fr> on 2015/02/18 10:59:47 UTC

[users@httpd] form-login-handler - AuthFormLoginSuccessLocation

Hi,

Please help...

Can anyone explain to me where I make a mistake?

I try to protect a portion of my web site with the following guidelines.

http://httpd.apache.org/docs/2.4/en/mod/mod_auth_form.html


with this config I can not enter the url :  http://admin.mydomain.com/admin/index.html
I have the following error
Method Not Allowed
The requested method GET is not allowed for the URL /secure/index.php.
 



My config is:

/index.html (Public root / auth form)
/admin/index.html (The contents of the folder i wish to protect)

http://admin.mydomain.com/script/index.php
<form method="POST" action="/admin">
  Username: <input type="text" name="httpd_username" value="" />
  Password: <input type="password" name="httpd_password" value="" />
  <input type="submit" name="login" value="Login" />
</form>


My apache conf.

<VirtualHost *:80>
    ServerName mydomain.com

    DocumentRoot /var/www/mydomain.com/admin/

    <Directory /var/www/mydomain.com/admin/>
        <LimitExcept GET POST>
             Require all denied
        </LimitExcept>
        Options -ExecCGI -FollowSymLinks -Includes -Indexes -MultiViews
        Require all granted
    </Directory>

    <Location /admin>
        SetHandler form-login-handler
        AuthFormLoginRequiredLocation http://admin.mydomain.com/index.html
        AuthFormLoginSuccessLocation http://admin.mydomain.com/admin/index.html
        AuthFormProvider file
        AuthUserFile /var/www/mydomain.com/admin_inc/.htpasswd
        AuthType form
        AuthName realm
    </Location>
</VirtualHost>


[auth_form:error] [pid XXXX] [client XXXXXXX] AH01811: the form-login-handler only supports the POST method for admin/index.html, referer: http://XXXXXXX/


Regards.






__________________________
Avant d'imprimer, pensez à l'environnement ! Please consider the environment before printing ! 
Ce message et toutes ses pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. IFP Energies nouvelles décline toute responsabilité au titre de ce message. This message and any attachments are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. IFP Energies nouvelles should not be liable for this message.
__________________________