Management found out that the highly sensitive and top secret documents are accessible to all!
They must be hidden ASAP!
TOP-SECRET web page (http://envXXX.target02:8080/)
You must protect this apache web server with authentication!
Configure basic authentication to protect the page
Use these credentials for auth:
Username: mulder
Password: Scully-th3-b3st!
SSH access:
Hostname: envXXX.target02 Port: 2222
Username: user
Password: Cool2Pass
Connect to SSH server.
# ssh -p 2222 user@envXXX.target02
user@envXXX.target02's password:
To run a command as administrator (user "root"), use "sudo ".
See "man sudo_root" for details.
Edit /etc/apache2/sites-enabled/000-default.conf
and add config below, before </VirtualHost>
.
user@web-server:~$ sudo vim /etc/apache2/sites-enabled/000-default.conf
<Directory "/var/www/html">
AuthType Basic
AuthName "Restricted Content"
AuthUserFile /etc/apache2/.htpasswd
Require valid-user
</Directory>
Create mulder
user.
user@web-server:~$ sudo htpasswd -bc /etc/apache2/.htpasswd mulder 'Scully-th3-b3st!'
Adding password for user mulder
Restart apache2 service.
user@web-server:~$ sudo service apache2 restart
* Restarting Apache httpd web server apache2
Done.