Answer: Do the following steps as:
1.vi /etc/httpd/conf/httpd.conf
ServerNamewww.abc.com
DocumentRoot /var/www/abc/
Order Allow, Deny
Allow from .example.com
DirectoryIndexindex.html
ServerAdminwebmaster@abc.com
ErrorLog logs/error_abc.logs
CustomLog logs/custom_abc.logs common
2.Create the directory and index page on specified path. (Index page can download fromftp://server1.example.comat exam time)
Check the SELinux context of index page , should like this:
-rw-r--r-- root root system_u:object_r:httpd_sys_content_t /var/www/html/index.html
If SELinux Context is mismatched, use the restorecon –R /var command
3.service httpd start|restart
4.chkconfig httpd on
Order allow, denyAllows explicitly allowed clients, denies everyone else; clients matched by both allow and deny are denied.
Order deny, allowdenies explicitly denied clients, allows everyone else, clients matched by both allow and deny are allowed.
Submit