httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Humberto Castro <humbertoe.cast...@gmail.com>
Subject [users@httpd] ¿How to solve '500 Internal Server Error' ?
Date Fri, 18 Apr 2014 19:24:52 GMT
Hello. I am configuring restricted access to a directory within my site,
using the file '.htaccess' which references a file where the list of users
is, denominated 'htpasswd'; but having already uploaded the two files (in
the same folder), when I try to access via web to the protected folder, the
first time is displayed the popup asking for username and password, but
once I enter the data is displayed the following message:



--------------------------------------------------

Internal Server Error



The server encountered an internal error or misconfiguration and was unable
to complete your request.



Please contact the server administrator, support@dominio.com and inform
them of the time the error occurred, and anything you might have done that
may have caused the error.



More information about this error may be available in the server error log.

--------------------------------------------------



And the next time I go back to try to get, not even asks for my username
and password, but immediately the same above error message is displayed.
¿What could I be doing wrong in the process ? Thanks and I hope you can
help me.



Initially I tried the protection placing the file ‘.htpassswd’ in the root,
and accordingly placing the first line of ‘.htaccess’ like this:
“AuthUserFile /.htpasswd”. At this point of time the problem presented was
exactly the same (the first time the system asked me for the username and
password, and then it displayed the error message; the following times not
even asked for the user data and immediately it displayed the error). So
that's the reason I opted to move the '.Htpasswd' to the same protected
directory to detect well what was my mistake.



I have also tested leaving the '.Htaccess' file completely blank and, thus
is not generated any error message; obviously it does not request data to
validate username.



Initially I had expected the original password of the user within the
'.Htpasswd' file, it was encrypted by the Crypt() function of PHP, but this
did not happened.



--------------------------------------------------

The contents of my '.Htaccess' file is:

AuthUserFile /ruta/.htpasswd

AuthName 'Por favor, introduzca usuario y contraseña'

AuthType Basic

Require valid-user



The contents of the '.Htpasswd' file is:

uprueba:cumGzwtU82Vts

--------------------------------------------------



I have noticed that removing the line 'Require valid-user' the error is not
generated - but obviously the system lets access the directory without
validating the user. I even tried changing this line with 'Require user
uprueba', but thus the same error message is generated.



I also changed the permissions on both files to '755', even to '777', but
the error is still generated.



--

HUMBERTO

Mime
View raw message