Apache Server how to set password for all access?

Hello all,

I am new to Linux and am trying to set a password for access to Apache server access. I have both Apache and Tomcat installed in my server, Apache forwards the requests to our Tomcat server which servers the java application we have.

The Java application is not configured to ask for a password, I want to know if I can specify a Username and password to "ALL ACCESS TO APACHE SERVER". I mean if anybody accesses the system they should be asked for a password, before the request is sent to tomcat.

Instead of a ".htaccess" file put in the directory to ask for a password. Can I just use something which asks password for "all access".

Like maybe changing something in the AuthType or something??

AuthType Basic
AuthName "Restricted Files"

I didn't get the "all access" part, what do you mean ? Else, passwords are achieved via "htpasswd" utility, read its man pages.