Friday, July 2, 2021
File base authentication in Tomcat with .well-known directory on windows
Hi Everyone, today i'll walk you through step by step to create http file base authentication on tomcat windows for Certificate Authority domain Validation. So let's begin without wasting anymore time.
File base authentication on Tomcat with .well-known directory on windows
When uploading/creating the folder/file to Tomcat, please keep in mind that the file should be accessible via the standard ports - 80 (for a non-secure connection) or 443 (for a secure one).
Domain url needs be accessed publicly same as below
http://domain.com/.well-known/pki-validation/filename.txt
By default, Tomcat uses the 8080 and 8443 ports, respectively.
If the file will be accessible via the default Tomcat ports 8080 and 8443 only, the validation will not be completed.
The document root folder for the website on Tomcat can be found in the ‘server.xml’ file in the following line:
<Context path="/" docBase="/some/full/path/to/document/root/folder" />
Usually, the server root folder is located in the folder set under the variable $CATALINA_HOME or webapps and the document root folder for the website is set to the particular folder under the server root folder.
You can create the ‘.well-known’ and ‘pki-validation’ folders for placing the validation file using the command line with command like mkdir from command prompt in same folder as .well-known folder can not be created by clicking on create folder
open command prompt in root folder and type
mkdir .well-known as dot(.) file can not be created with GUI.
rest folders like pki-validation can be created from GUI and so as empty txt file and then paste the random value inside txt file.
so the url becomes http://domain.com/.well-known/pki-validation/filename.txt followed by random value/meta tag in txt file. url should be publicly accessible on default 80 or 443 port displaying the value on browser.
Incase url is not acessible from outside check ports open status from firewall.
Should you have any queries then please write them in comments and will be happy to answer.
Stay tuned for more blogs. :
No comments :
Post a Comment