Before I make blanket statement in the next paragraph I need to clarify that all testing was performed using Apache2 (V2.4) on an xampp localhost and a Ubuntu 18.04 server and this post is based on the results of those tests. Neither have control panels like cPanel. cPanel makes this job simple but is just a tad pricey for most self managed VPS users.
If you have a VPS or dedicated server, are manually trying to follow online tutorials and keep getting 500 errors. It is because all the tutorials on the first page of Google results are providing you with bad information. All of them say something like:
If you leave any spaces in "Members Only Area" you will get a 500 error and an entry into your Apache error log that reads something like thisCreate a .htaccess file
Use a plain text editor (eg an ASCII text editor) like Notepad to create a text file with the following contents:
AuthName "Members Only Area"
AuthType Basic
AuthUserFile /path/to/your/directory/.htpasswd
require valid-user
One argument means one word or words connected with an _ underscore.[Tue Jun 02 08:08:24.193066 2020] [core:alert] [pid 9504:tid 1924] [client ::1:53296] C:/xampp/htdocs/temp/admin/.htaccess: AuthName takes one argument, the authentication realm (e.g. "Members Only")
You can use Members_Only_Area if that is what you want it to read but you can't leave spaces. The quotes are not needed and if used will display as part of the name.
Xampp will allow to use a plain text password but a live server forces encryption. Also you can not copy the .htpasswd from localhost to a live server or from one server to another*. You must follow the directions to create the user and password on the server you intend to use it on.
*Edit: I may have been wrong when I said "or from one server to another." As I did do that where both servers were running the same version of Apache and it worked.