Yes, you are right… thanks for reviewing @Lakshmi !
Please, i have tried, and tried and always finished the task so:
Steps
-
Create a subfolder which is going to be protect
e.g. mkdir -p /var/www/html/devops -
Create/add .htaccess file to the folder created above
vim /var/www/html/devops/.htaccess
AuthType Basic
AuthName “Restricted Content”
AuthUserFile /etc/httpd/.htpasswd
Require valid-user -
Create a user/password in htpasswd
htpasswd -c /etc/httpd/.htpasswd mark -
Modify the configuration file by adding below section…
vim /etc/httpd/conf/httpd.conf
<Directory “/var/www/html/devops”>
AllowOverride AuthConfig -
Start/restart httpd
systemctl start httpd
6.- curl -u user:passwd http://<server ip/name>:8080/devops
1 Like
Forget about it, so it was success
Regards