Oracle Linux 7 System Administration — Question 1
Examine this extract from /etc/httpd/conf/httpd.conf for virtual hosts:
<VirtualHost *:80>
ServerAdmin[email protected]
DocumentRoot /www/docs/site1.example.com
ServerName site1.example.com -
</VirtualHost>
<VirtualHost *:80>
ServerAdmin[email protected]
DocumentRoot /www/docs/site2.example.com
ServerName site2.example.com -
</VirtualHost>
Which three statements are true about the configuration extract?
Answer options
- A. To connect to the website, site1.example.com must resolve to a different IP address than site2.example.com.
- B. site1.example.com and site2.example.com can share the same IP address.
- C. The web server attempts a DHCP discover to assign one IP address per virtual host.
- D. It is possible but not mandatory to have unique IP addresses for each virtual host.
- E. The site1.example.com virtual host shares and error logs with site2.example.com.
Correct answer: A, C, E
Explanation
Statement A is correct because each site requires a unique resolution for proper access. Statement C is incorrect as DHCP is not involved in virtual host IP assignment; it uses the configured IP addresses. Statement E is also incorrect as virtual hosts typically have separate logs unless configured otherwise.