Jump to content

Website Login


Guest LightKeeper
 Share

Recommended Posts

Guest LightKeeper

I have a pretty basic html website. I was wondering if anyone knew how to make a login for a website that is written in .html?

Link to comment
Share on other sites

Not sure if this is the answer to your question but if you go into cpanel and select Web Protect and select your root folder you can then add users and passwords the will prompt a login box to appear before they can enter your site.

 

If this isn't the answer you were looking for, please provide more info and we'll try to help.

Edited by TCH-Bruce
Link to comment
Share on other sites

Hi there TCH-Bruce!

 

Nice to SEE you! ;)

 

I've been talking with LightKeeper off line and I think I'm suggesting the same thing you are. That is: to password protect the directory that he wants protected.

 

However, we've both found that you can't do that to the root directory for some reason.

 

If your "Web Protect" is something else, speak up. I'm not sure of a solution to do what we are talking about at the root level, which is what he wants.

 

Thanks!

 

Bill

Link to comment
Share on other sites

The easiest way (for some reason cPanel doesn't want to do it) is to just create a dummy directory (call it "secure" or something), and use web protect to create your users and enable web protection on that directory.

 

Then, copy the lines that look like the following out of the .htaccess file and put them in your .htaccess file of your public_html directory...

 

>AuthType Basic
AuthName "Members Only"
AuthUserFile "/home/account/.htpasswds/secure/passwd"
require valid-user

 

Then keep your "secure" directory around, because you can go back into web protect and manage the users by selecting the secure directory since the parent directory is using the same "passwd" file.

 

I'm not sure why cPanel won't let you web protect the main directory directly.

Link to comment
Share on other sites

Guest LightKeeper
The easiest way (for some reason cPanel doesn't want to do it) is to just create a dummy directory (call it "secure" or something), and use web protect to create your users and enable web protection on that directory.

 

Then, copy the lines that look like the following out of the .htaccess file and put them in your .htaccess file of your public_html directory...

 

>AuthType Basic
AuthName "Members Only"
AuthUserFile "/home/account/.htpasswds/secure/passwd"
require valid-user

 

Then keep your "secure" directory around, because you can go back into web protect and manage the users by selecting the secure directory since the parent directory is using the same "passwd" file.

 

I'm not sure why cPanel won't let you web protect the main directory directly.

That worked.... Thanks TCH-MikeJ

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...