The first one is to disable the Apache Server from exposing its version and OS of the server to any remote client connecting to Apache. - This worked with no error/issue.
To disable directory listing of the web site root ie /var/www/html/blog
My steps to the solution
a. Changed the AllowOverride None to AllowOverride All in /etc/httpd/conf/httpd.conf
b. Created the .htaccess file on /var/www/html/blog directory
c. Added the line “Options -Indexes” without quotations in .htaccess file.
d. Restarted the Apache service
e. Verified the Apache service to be running.
I am getting an error saying directory is not disabled!
Please note that you changed AllowOverride None to AllowOverride All for <Directory "/var/www">
<Directory "/var/www">
AllowOverride None
# Allow open access:
Require all granted
</Directory>
Since default document root i.e <Directory "/var/www/html"> do have its own section to manage these settings so you should have made these changes under <Directory "/var/www/html"> instead. Your htaccess changes were not considered at all.
I hope its clear to you now why this task failed for you.
Thanks. Yes I understand the change is supposed to be on the document root. I am just asking my self why I changed the other directory I think I’ll have to be more careful the next time I am editing the files.
I have worked as mentioned in my snips above, unfortunately i ended up with result as Task Failed.
Please do some more research from your end (i was able to do only as above) and try to perform, all the best.
I tired to access the " Select Port to view Host 1" and choose the port number as 8080…but still I’m getting view of Quiz question page…which port number should i give the view the apache web page