Create /var/www/html/sysops direcotry if doesn’t exist.
Add a user mariyam in htpasswd and set its password to LQfKeWWxWD.
There is a file /tmp/index.html placed on Jump Server. Copy the same to new directory you created, please make sure default document root should remain /var/www/html. Also website should work on URL http://:/sysops
Draft of part of commands:
cat < /var/www/html/sysops/index.html
This is xFusionCorp Industries Protected Directory!
htpasswd -c /var/www/html/sysops/.htpasswd mariyam
cat < /var/www/html/sysops/.htaccess
AuthName “Password Required”
Require user mariyam
chown -R apache:apache /var/www/html/
chmod 755 -R /var/www/html/
Alias added to /etc/httpd/conf/httpd.conf and httpd restarted. Works fine from localhost and jumphost:
curl -u mariyam:LQfKeWWxWD http://stapp01:8080/sysops - works fine from App01 and from jumphost.
Here is an evidence that only authorized access works fine: