Getting 500 Internal Server Error - .htaccess

Username (e.g. epiz_XXX) or Website URL

Username: epiz_24241321

Error Message

500 Internal Server Error

Oops, something broke when loading the page you requested! This is usually caused by things like bad .htaccess lines.

Other Information


RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

AuthType Basic
AuthName “Restricted area”
AuthUserFile “/htdocs/.htpasswd”
AuthGroupFile “/htdocs/.htgroup”
Require group trusted

I want log my user in htdocs path with a user from group trusted but for some reasons givesme 500 internal error, i suspect it can be AuthGroupFile command. I try remove it and change Require argument to valid-user and gives same error.


Related post: Error 500 when password protecting website with .htaccess

Try to remove that

Yes, remove fix i tested yesterday, but this not helps, i try with require valid-user the 1st time worked, but now looks like the server givesme 500 error all the time, i need auth basic for authorize to some people have access to htdocs. I try too remove the https rules, givesme same error. I think i need restart my server if its possible. @Admin

You cannot ping Admin. It doesn’t work.

I fixed it using Directory Privacy from cPanel. Without rename .htpasswd.3736382… works, if you make changes gives 500 error. By the way, on .htaccess will be writen new commands, the old don’t will be removed, remove if you see are duplicated.

Please try using our Directory Privacy tool instead. Writing the password files by hand is finicky in my experience.

And looking at the code, a few potential issues come to mind:

  • AuthGroupFile is probably not supported.
  • If you start the file path with a /, the file path is relative to the main directory of the server, not of your website. Removing that first slash should allow it to load the file.

I don’t know if this is the best place to post this message but i find an issue with Directory Privacy, when you add new username to specific path, in file .htpasswd.(random) is generated only 1 user.


I have user root1234 with some password, on .htpasswd.(random) is stored this user:(hashed password)

Now i want add another user to same path. For example abcd1234 with his password.

When i add that user, the another user its like not stored, looks like the server uses command htpasswd -c file abcd1234

With -c parameter its created new file with only 1 user. In that case abcd1234:(hashed password)

I make a file with all users, paste manually all users in and looks like work.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.