Internal server error 500 when using .htaccess file for auth

you mean in the page where i turned the errors on?
or the page where it says ‘internal error 500’?

After you turn in errors in the control panel, the errors will appear on your website.

1 Like

but this is my webpage

just turn on display errors

when i inspect element and go into the console, i see this


is this an error with my page or theirs?

You need to read this

4 Likes

I read that but i already know what teh problem is; it’s in this:

AuthType Basic
AuthName "A password is required to visit this site."
AuthUserFile .htpasswd
Require valid-user

So if you remove that, it works fine?

yes. thefirst time i put it in, it worked. then, i changed it slightly and it failed. i did a few more changes, then, i dei=cided to undo the changes and i accedentally undid too many, then pressed cmd + a and apparently pycharm decided that was a change so i couldnt redo. if theres a way to get version history in pycharm, please tell me. Also, what i posted there is all of the text in the .htaccess file.

I also get this warning:

DevTools failed to load source map: Could not load content for chrome-extension://[insert random letters]/browser-polyfill.js.map: System error: net::ERR_FILE_NOT_FOUND

What does that mean? I don’t have any chrome extentions active right now.

Error Message:

This site can't provide a secure connection

The site sent an invalid response

Other Information:

I was using

RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:CF-Visitor} !{"scheme":"https"}
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

to redirect traffic to https, and i got the same error when I manually typed https://mysite.example.com

I have the ZeroSSL certificate installed:


image

A redirect to a 500 page means your .htaccess code is invalid. Unfortunately, there isn’t any kind of debug logging with .htaccess rules, so your best bet is to selectively comment out lines to figure out what breaks.

Also, password protection is notoriously difficult to set up in my experience. So I strongly suggest to use the Protected Directories tool in the client area to setup password protection instead of fiddling with it yourself.


As for the SSL error, please note that the SSL certificate status says “Issued”, not “Installed”. Just because the certificate exists doesn’t mean it’s being used on your site. If you click the certificate in the client area, it will tell you which certificate is being used on your site right now, and provides a one-click install button to install that ZeroSSL certificate.

If you want anyone to check if your certificate was actually installed, and what specifically you can do, please share the domain name.

3 Likes

I clicked install at least 5 times - why is it not working?

When I created my website, it didn’t come with a .htaccess file. This is I believe because I’d already created one before. Do I need any code at the start and end of the file before I use it?

I don’t know. You won’t let us check. No domain = no troubleshooting.

No, you don’t need any .htaccess rules for your website to work. If the rules you have right now are causing 500 errors, it’s because the rules you have added are invalid.

2 Likes

therearetomanynamestaken.great-site.net

For now, I’ve removed the files that cause problems. I’ll add them in again when I’ve got a laptop/pc available.

Thank you for sharing the domain name.

Seeing the domain, the issue with SSL is very obvious. Or rather the lack of issues, because your SSL certificate is working exactly as it’s supposed to. But if you choose the SSL vendor “Self Signed (not trusted)”, you get a certificate that’s self signed, and not trusted.

If you want a certificate that does give you a green lock, you’ll want a certificate that’s trusted, which a Self Signed certificate is not.

Please request a new SSL certificate any choose any provider EXCEPT for the “Self Signed” one.

2 Likes

Hi, I see at least this problem and it took me a few hours searching the web too:

You are having:
AuthUserFile .htpasswd

It should be something like this:
AuthUserFile /home/vol12_1/epizy.com/epiz_00000001/htdocs/.htpasswd

The home directory part is unique to every user:
/home/vol12_1/epizy.com/epiz_00000001
you can find it at your control panel somewhere.

The rest, just look at your FileZilla folder:
/htdocs/.htpasswd

Thanks

I don’t think you should’ve spent hours

I solved it just using Cpanel anyway
image
died for nothing :sob::sob: